From 29be9e3d1ba4136bb2b296c459362daf183412a8 Mon Sep 17 00:00:00 2001 From: anjiahao Date: Thu, 23 Jun 2022 10:35:05 +0800 Subject: [PATCH] apps:fix reset cuase wraming nsh_syscmds.c:352:40: error: passing argument 2 of 'boardctl' makes integer from pointer without a cast [-Werror=int-conversion] 352 | ret = boardctl(BOARDIOC_RESET_CAUSE, &cause); | ^~~~~~ | | | struct boardioc_reset_cause_s * Signed-off-by: anjiahao --- nshlib/nsh_syscmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nshlib/nsh_syscmds.c b/nshlib/nsh_syscmds.c index 87c4eaac0..9206c7d57 100644 --- a/nshlib/nsh_syscmds.c +++ b/nshlib/nsh_syscmds.c @@ -344,7 +344,7 @@ int cmd_reset_cause(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) struct boardioc_reset_cause_s cause; memset(&cause, 0, sizeof(cause)); - ret = boardctl(BOARDIOC_RESET_CAUSE, &cause); + ret = boardctl(BOARDIOC_RESET_CAUSE, (uintptr_t)&cause); if (ret < 0) { nsh_error(vtbl, g_fmtcmdfailed, argv[0], "boardctl", NSH_ERRNO);