Skip to content

Commit

Permalink
Fixes nuttx target warning
Browse files Browse the repository at this point in the history
```
jerry-main.c: In function 'str_to_uint':
jerry-main.c:89:12: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
   89 |     *out_p = num_str_p;
make[4]: Leaving directory '/home/runner/work/jerryscript/jerryscript/targets/os/nuttx'
make[3]: Leaving directory '/home/runner/work/jerryscript/apps'
```

JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo [email protected]
  • Loading branch information
lygstate committed Mar 1, 2022
1 parent 0d49696 commit 969b681
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions targets/os/nuttx/jerry-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand All @@ -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 */

Expand Down Expand Up @@ -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
{
Expand Down

0 comments on commit 969b681

Please sign in to comment.