Skip to content

Commit 09f0f89

Browse files
JianyuWang0623raiden00pl
authored andcommitted
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>
1 parent 9968fa0 commit 09f0f89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nshlib/nsh_syscmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ int cmd_reset_cause(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
510510

511511
if (cause.cause != BOARDIOC_RESETCAUSE_CPU_SOFT)
512512
{
513-
nsh_output(vtbl, "%s(%lu)\n",
513+
nsh_output(vtbl, "%s(%" PRIu32 ")\n",
514514
g_resetcause[cause.cause], cause.flag);
515515
}
516516
else

0 commit comments

Comments
 (0)