From 6358606b4d129f2c556ee6bb5e14fd9cf0d214dc Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Thu, 10 Feb 2022 17:03:36 +0800 Subject: [PATCH] Fixes nuttx target warning The warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com --- targets/os/nuttx/jerry-main.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/targets/os/nuttx/jerry-main.c b/targets/os/nuttx/jerry-main.c index d09c438355..ab0b2169dc 100644 --- a/targets/os/nuttx/jerry-main.c +++ b/targets/os/nuttx/jerry-main.c @@ -70,8 +70,7 @@ print_help (char *name) * @return converted number */ static uint32_t -str_to_uint (const char *num_str_p, /**< string to convert */ - char **out_p) /**< [out] end of the number */ +str_to_uint (const char *num_str_p) /**< string to convert */ { assert (jerry_feature_enabled (JERRY_FEATURE_ERROR_MESSAGES)); @@ -84,11 +83,6 @@ str_to_uint (const char *num_str_p, /**< string to convert */ num_str_p++; } - if (out_p != NULL) - { - *out_p = num_str_p; - } - return result; } /* str_to_uint */ @@ -176,7 +170,7 @@ jerry_main (int argc, char *argv[]) { if (++i < argc) { - debug_port = str_to_uint (argv[i], NULL); + debug_port = str_to_uint (argv[i]); } else {