pc-bios/s390-ccw/s390-ccw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
From: Thomas Huth <thuth@redhat.com>
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.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
pc-bios/s390-ccw/s390-ccw.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pc-bios/s390-ccw/s390-ccw.h b/pc-bios/s390-ccw/s390-ccw.h
index b1dc35cdedf..6a0b987e303 100644
--- a/pc-bios/s390-ccw/s390-ccw.h
+++ b/pc-bios/s390-ccw/s390-ccw.h
@@ -119,7 +119,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
}
--
2.53.0
On 3/6/2026 12:36 PM, Thomas Huth wrote:
> From: Thomas Huth <thuth@redhat.com>
>
> 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.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> pc-bios/s390-ccw/s390-ccw.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/pc-bios/s390-ccw/s390-ccw.h b/pc-bios/s390-ccw/s390-ccw.h
> index b1dc35cdedf..6a0b987e303 100644
> --- a/pc-bios/s390-ccw/s390-ccw.h
> +++ b/pc-bios/s390-ccw/s390-ccw.h
> @@ -119,7 +119,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
> }
>
I am curious, this change has been there for at least 2 years...any
reason the compiler tripped now? Or we never built with DEBUG=1 before?
Reviewed-by: Farhan Ali<alifm@linux.ibm.com>
On 06/03/2026 21.45, Farhan Ali wrote:
>
> On 3/6/2026 12:36 PM, Thomas Huth wrote:
>> From: Thomas Huth <thuth@redhat.com>
>>
>> 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.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>> pc-bios/s390-ccw/s390-ccw.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/pc-bios/s390-ccw/s390-ccw.h b/pc-bios/s390-ccw/s390-ccw.h
>> index b1dc35cdedf..6a0b987e303 100644
>> --- a/pc-bios/s390-ccw/s390-ccw.h
>> +++ b/pc-bios/s390-ccw/s390-ccw.h
>> @@ -119,7 +119,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
>> }
>
> I am curious, this change has been there for at least 2 years...any reason
> the compiler tripped now? Or we never built with DEBUG=1 before?
The pc-bios is rather low traffic - I guess nobody really tried compiling
with DEBUG=1 within the last two years.
> Reviewed-by: Farhan Ali<alifm@linux.ibm.com>
Thanks!
Thomas
© 2016 - 2026 Red Hat, Inc.