Blame SOURCES/0003-dump-Fix-build-on-i686.patch

64392a
From 590e3a010d2c840314702883e44ec9841e3383c6 Mon Sep 17 00:00:00 2001
64392a
From: "Richard W.M. Jones" <rjones@redhat.com>
64392a
Date: Thu, 30 Jun 2022 22:27:43 +0100
64392a
Subject: [PATCH] dump: Fix build on i686
64392a
MIME-Version: 1.0
64392a
Content-Type: text/plain; charset=UTF-8
64392a
Content-Transfer-Encoding: 8bit
64392a
64392a
Because we used the wrong printf format, the build would fail on
64392a
32 bit architectures but succeed on 64 bit:
64392a
64392a
dump.c: In function ‘do_dump’:
64392a
dump.c:421:21: error: format ‘%zx’ expects argument of type ‘size_t’, but argument 2 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Werror=format=]
64392a
       printf ("%010zx", offset + i);
64392a
                ~~~~~^   ~~~~~~~~~~
64392a
                %010llx
64392a
64392a
(cherry picked from commit ce004c329c7fcd6c60d11673b7a5c5ce3414413b)
64392a
---
64392a
 dump/dump.c | 2 +-
64392a
 1 file changed, 1 insertion(+), 1 deletion(-)
64392a
64392a
diff --git a/dump/dump.c b/dump/dump.c
64392a
index 7818f1f..8bf62f9 100644
64392a
--- a/dump/dump.c
64392a
+++ b/dump/dump.c
64392a
@@ -418,7 +418,7 @@ do_dump (void)
64392a
 
64392a
       /* Print the offset. */
64392a
       ansi_green ();
64392a
-      printf ("%010zx", offset + i);
64392a
+      printf ("%010" PRIx64, offset + i);
64392a
       ansi_grey ();
64392a
       printf (": ");
64392a
 
64392a
-- 
64392a
2.31.1
64392a