diff options
author | Tom Rini <trini@ti.com> | 2012-10-29 14:53:18 +0000 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2012-11-02 15:13:29 -0700 |
commit | 085b9c3a1dfa3f29cf2bb34f434be318ba313f57 (patch) | |
tree | e18d1cf6652dcbe558a48daeb4d30c088de0c0a7 /common/cmd_fdt.c | |
parent | a1b231cef634d8aaa002bcb848332785803127c8 (diff) | |
download | u-boot-imx-085b9c3a1dfa3f29cf2bb34f434be318ba313f57.zip u-boot-imx-085b9c3a1dfa3f29cf2bb34f434be318ba313f57.tar.gz u-boot-imx-085b9c3a1dfa3f29cf2bb34f434be318ba313f57.tar.bz2 |
cmd_fdt.c: Use %p when printing pointers
When putting pointers into a format string use %p to ensure that they
are printed correctly regardless of bitsize. This fixes warnings on
sandbox on 64bit systems.
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Gerald Van Baren <vanbaren@cideas.com>
Signed-off-by: Tom Rini <trini@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'common/cmd_fdt.c')
-rw-r--r-- | common/cmd_fdt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c index a5e2cfc..f9acfc1 100644 --- a/common/cmd_fdt.c +++ b/common/cmd_fdt.c @@ -375,7 +375,7 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) /* Get address */ char buf[11]; - sprintf(buf, "0x%08X", (uint32_t)nodep); + sprintf(buf, "0x%p", nodep); setenv(var, buf); } else if (subcmd[0] == 's') { /* Get size */ @@ -816,7 +816,7 @@ static void print_data(const void *data, int len) if ((len %4) == 0) { if (len > CONFIG_CMD_FDT_MAX_DUMP) - printf("* 0x%08x [0x%08x]", (unsigned int)data, len); + printf("* 0x%p [0x%08x]", data, len); else { const u32 *p; @@ -828,7 +828,7 @@ static void print_data(const void *data, int len) } } else { /* anything else... hexdump */ if (len > CONFIG_CMD_FDT_MAX_DUMP) - printf("* 0x%08x [0x%08x]", (unsigned int)data, len); + printf("* 0x%p [0x%08x]", data, len); else { const u8 *s; |