Commit 14c29f2906 for qemu.org
commit 14c29f29064dc05088ca2b97afb7e783aa1697a0
Author: Thomas Huth <thuth@redhat.com>
Date: Fri Mar 6 21:36:45 2026 +0100
pc-bios/s390-ccw: Fix compiler warning when compiling with DEBUG enabled
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>
diff --git a/pc-bios/s390-ccw/s390-ccw.h b/pc-bios/s390-ccw/s390-ccw.h
index ccd68ff0a4..1e1f71775e 100644
--- a/pc-bios/s390-ccw/s390-ccw.h
+++ b/pc-bios/s390-ccw/s390-ccw.h
@@ -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
}