From e48f3741c357246c78aa367bbd56fe2684f7bf8d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 11 Nov 2014 12:47:07 -0700 Subject: sandbox: Fix warnings due to 64-bit printf() strings Now that we have inttypes.h, use it in a few more places to avoid compiler warnings on sandbox when building on 64-bit machines. Signed-off-by: Simon Glass --- common/cmd_mem.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'common/cmd_mem.c') diff --git a/common/cmd_mem.c b/common/cmd_mem.c index 0d50dcfe9c..bcb3ee325a 100644 --- a/common/cmd_mem.c +++ b/common/cmd_mem.c @@ -19,6 +19,7 @@ #include #endif #include +#include #include #include #include @@ -338,7 +339,8 @@ static int do_mem_cmp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) if (word1 != word2) { ulong offset = buf1 - base; #ifdef CONFIG_SYS_SUPPORT_64BIT_DATA - printf("%s at 0x%p (%#0*llx) != %s at 0x%p (%#0*llx)\n", + printf("%s at 0x%p (%#0*"PRIx64") != %s at 0x%p (%#0*" + PRIx64 ")\n", type, (void *)(addr1 + offset), size, word1, type, (void *)(addr2 + offset), size, word2); #else @@ -1146,7 +1148,7 @@ mod_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const argv[]) printf(" %08x", *((u32 *)ptr)); #ifdef CONFIG_SYS_SUPPORT_64BIT_DATA else if (size == 8) - printf(" %016llx", *((u64 *)ptr)); + printf(" %016" PRIx64, *((u64 *)ptr)); #endif else if (size == 2) printf(" %04x", *((u16 *)ptr)); -- cgit v1.2.1