mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-20 04:26:04 +08:00
nshlib/reset_cause: Fix format warning for flag
Fix format string not appropriate warning for cause.flag. nsh_syscmds.c: In function 'cmd_reset_cause': nsh_syscmds.c:513:24: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint32_t' {aka 'unsigned int'} [-Werror=format=] 513 | nsh_output(vtbl, "%s(%lu)\n", | ^~~~~~~~~~~ 514 | g_resetcause[cause.cause], cause.flag); | ~~~~~~~~~~ | | | uint32_t {aka unsigned int} Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
This commit is contained in:

committed by
Mateusz Szafoni

parent
9968fa064b
commit
09f0f89e3a
@@ -510,7 +510,7 @@ int cmd_reset_cause(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
|
|||||||
|
|
||||||
if (cause.cause != BOARDIOC_RESETCAUSE_CPU_SOFT)
|
if (cause.cause != BOARDIOC_RESETCAUSE_CPU_SOFT)
|
||||||
{
|
{
|
||||||
nsh_output(vtbl, "%s(%lu)\n",
|
nsh_output(vtbl, "%s(%" PRIu32 ")\n",
|
||||||
g_resetcause[cause.cause], cause.flag);
|
g_resetcause[cause.cause], cause.flag);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user