libnbd/0007-dump-Fix-build-on-i686.patch
Richard W.M. Jones d54f60e8f8 Rebase to new stable branch version 1.12.4
resolves: rhbz#2059288

- New tool: nbddump
- nbdcopy: Use preferred block size for copying
  related: rhbz#2047660

Partially cherry picked from commit ecbcec1d10
2022-07-05 11:47:56 +01:00

39 lines
1.1 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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