Skip to content

Commit f322f60

Browse files
authored
Fixes nuttx target warning (#4984)
The warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo [email protected]
1 parent f0a249d commit f322f60

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

targets/os/nuttx/jerry-main.c

+2-8
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ print_help (char *name)
7070
* @return converted number
7171
*/
7272
static uint32_t
73-
str_to_uint (const char *num_str_p, /**< string to convert */
74-
char **out_p) /**< [out] end of the number */
73+
str_to_uint (const char *num_str_p) /**< string to convert */
7574
{
7675
assert (jerry_feature_enabled (JERRY_FEATURE_ERROR_MESSAGES));
7776

@@ -84,11 +83,6 @@ str_to_uint (const char *num_str_p, /**< string to convert */
8483
num_str_p++;
8584
}
8685

87-
if (out_p != NULL)
88-
{
89-
*out_p = num_str_p;
90-
}
91-
9286
return result;
9387
} /* str_to_uint */
9488

@@ -176,7 +170,7 @@ jerry_main (int argc, char *argv[])
176170
{
177171
if (++i < argc)
178172
{
179-
debug_port = str_to_uint (argv[i], NULL);
173+
debug_port = str_to_uint (argv[i]);
180174
}
181175
else
182176
{

0 commit comments

Comments
 (0)