From 6ce585ac153b1bcf4d9110d1cf589bdbeab301cf Mon Sep 17 00:00:00 2001 From: David Gibson Date: Thu, 7 Nov 2019 17:46:43 +0100 Subject: [PATCH] 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 --- util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util.c b/util.c index 48af961..40274fb 100644 --- a/util.c +++ b/util.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -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 {