nshlib/nsh_dbgcmds.c: Fix a few printf warnings

This commit is contained in:
YAMAMOTO Takashi 2020-11-05 21:09:11 +09:00 committed by Xiang Xiao
parent a085678879
commit d6b67eb05e

View File

@ -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;