summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2019-11-07 17:46:43 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2019-11-07 17:46:43 +0100
commit6ce585ac153b1bcf4d9110d1cf589bdbeab301cf (patch)
tree4cbb6797e50334116b3e713b71ae4da01aaf2c87
parent7150286225476345bd6e7312331e3baf4d621c32 (diff)
downloaddevice-tree-compiler-6ce585ac153b1bcf4d9110d1cf589bdbeab301cf.tar.gz
Use correct inttypes.h format specifier
The type here is uint32_t which should use PRIx32, not plain %x which is for an int, we've just gotten away with it so far. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r--util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util.c b/util.c
index 48af961..40274fb 100644
--- a/util.c
+++ b/util.c
@@ -13,6 +13,7 @@
#include <stdarg.h>
#include <string.h>
#include <assert.h>
+#include <inttypes.h>
#include <errno.h>
#include <fcntl.h>
@@ -393,7 +394,7 @@ void utilfdt_print_data(const char *data, int len)
printf(" = <");
for (i = 0, len /= 4; i < len; i++)
- printf("0x%08x%s", fdt32_to_cpu(cell[i]),
+ printf("0x%08" PRIx32 "%s", fdt32_to_cpu(cell[i]),
i < (len - 1) ? " " : "");
printf(">");
} else {