]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
pc-bios/s390-ccw: Fix compiler warning when compiling with DEBUG enabled
authorThomas Huth <thuth@redhat.com>
Fri, 6 Mar 2026 20:36:45 +0000 (21:36 +0100)
committerThomas Huth <thuth@redhat.com>
Tue, 10 Mar 2026 05:46:45 +0000 (06:46 +0100)
When compiling with DEBUG=1, there is currently a compiler warning:

 pc-bios/s390-ccw: Compiling main.o
 In file included from /home/thuth/devel/qemu/pc-bios/s390-ccw/main.c:14:
 In file included from /home/thuth/devel/qemu/pc-bios/s390-ccw/helper.h:16:
 /home/thuth/devel/qemu/pc-bios/s390-ccw/s390-ccw.h:122:31: warning: format specifies type
       'unsigned int' but the argument has type 'u64' (aka 'unsigned long long') [-Wformat]
   122 |     printf("%s 0x%X\n", desc, addr);
       |                  ~~           ^~~~
       |                  %llX
 1 warning generated.

Fix it by using the right format string here.

Message-ID: <20260306203645.28232-1-thuth@redhat.com>
Reviewed-by: Farhan Ali<alifm@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
pc-bios/s390-ccw/s390-ccw.h

index ccd68ff0a4b90492b547047370c62c2378fb551e..1e1f71775ecdd4126a6f21cd401324851d4b2991 100644 (file)
@@ -112,7 +112,7 @@ static inline void fill_hex_val(char *out, void *ptr, unsigned size)
 static inline void debug_print_int(const char *desc, u64 addr)
 {
 #ifdef DEBUG
-    printf("%s 0x%X\n", desc, addr);
+    printf("%s 0x%llx\n", desc, addr);
 #endif
 }