You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/11/09 12:11:20 UTC

[incubator-nuttx-apps] 05/05: nshlib/nsh_dbgcmds.c: Fix a few printf warnings

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit d6b67eb05e806ae9550d563a5e04373a199e2886
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 5 21:09:11 2020 +0900

    nshlib/nsh_dbgcmds.c: Fix a few printf warnings
---
 nshlib/nsh_dbgcmds.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/nshlib/nsh_dbgcmds.c b/nshlib/nsh_dbgcmds.c
index 7559837..cb1a14e 100644
--- a/nshlib/nsh_dbgcmds.c
+++ b/nshlib/nsh_dbgcmds.c
@@ -445,7 +445,8 @@ int cmd_hexdump(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
                       dumpbytes = count;
                     }
 
-                  snprintf(msg, sizeof(msg), "%s at %08x", argv[1], skip);
+                  snprintf(msg, sizeof(msg), "%s at %08jx", argv[1],
+                           (uintmax_t)skip);
                   nsh_dumpbuffer(vtbl, msg,
                                  &buffer[nbytesread - (position - skip)],
                                  dumpbytes);
@@ -473,7 +474,8 @@ int cmd_hexdump(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
             }
 #endif
 
-          snprintf(msg, sizeof(msg), "%s at %08x", argv[1], position);
+          snprintf(msg, sizeof(msg), "%s at %08jx", argv[1],
+                   (uintmax_t)position);
           nsh_dumpbuffer(vtbl, msg, buffer, nbytesread);
           position += nbytesread;