summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2019-01-02 12:30:13 +0100
committerAndreas Schwab <schwab@linux-m68k.org>2019-01-02 12:35:12 +0100
commit78e113e81c9d33d0f33704b187a46399d5a75419 (patch)
treea9c3d4608de967e11883011788cb17f6d22eaef1
parentea7a8f6dad67d1d668df7e12adecf7783ac1874b (diff)
downloaddevice-tree-compiler-78e113e81c9d33d0f33704b187a46399d5a75419.tar.gz
Use PRIxPTR for printing uintptr_t values
Fixes: 49903aed77 ("use ptrdiff_t modifier for printing pointer differences") Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
-rw-r--r--fdtdump.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fdtdump.c b/fdtdump.c
index 760a25c..200fb06 100644
--- a/fdtdump.c
+++ b/fdtdump.c
@@ -100,7 +100,7 @@ static void dump_blob(void *blob, bool debug)
p = p_struct;
while ((tag = fdt32_to_cpu(GET_CELL(p))) != FDT_END) {
- dumpf("%04tx: tag: 0x%08"PRIx32" (%s)\n",
+ dumpf("%04"PRIxPTR": tag: 0x%08"PRIx32" (%s)\n",
(uintptr_t)p - blob_off - 4, tag, tagname(tag));
if (tag == FDT_BEGIN_NODE) {
@@ -140,8 +140,8 @@ static void dump_blob(void *blob, bool debug)
p = PALIGN(p + sz, 4);
- dumpf("%04tx: string: %s\n", (uintptr_t)s - blob_off, s);
- dumpf("%04tx: value\n", (uintptr_t)t - blob_off);
+ dumpf("%04"PRIxPTR": string: %s\n", (uintptr_t)s - blob_off, s);
+ dumpf("%04"PRIxPTR": value\n", (uintptr_t)t - blob_off);
printf("%*s%s", depth * shift, "", s);
utilfdt_print_data(t, sz);
printf(";\n");