* [PATCH] pc-bios/s390-ccw: Fix compiler warning when compiling with DEBUG enabled
@ 2026-03-06 20:36 Thomas Huth
2026-03-06 20:45 ` Farhan Ali
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Huth @ 2026-03-06 20:36 UTC (permalink / raw)
To: Christian Borntraeger, Jared Rossi, Zhuoying Cai, qemu-devel; +Cc: qemu-s390x
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] pc-bios/s390-ccw: Fix compiler warning when compiling with DEBUG enabled
2026-03-06 20:36 [PATCH] pc-bios/s390-ccw: Fix compiler warning when compiling with DEBUG enabled Thomas Huth
@ 2026-03-06 20:45 ` Farhan Ali
2026-03-06 20:50 ` Thomas Huth
0 siblings, 1 reply; 3+ messages in thread
From: Farhan Ali @ 2026-03-06 20:45 UTC (permalink / raw)
To: Thomas Huth, Christian Borntraeger, Jared Rossi, Zhuoying Cai,
qemu-devel
Cc: qemu-s390x
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] pc-bios/s390-ccw: Fix compiler warning when compiling with DEBUG enabled
2026-03-06 20:45 ` Farhan Ali
@ 2026-03-06 20:50 ` Thomas Huth
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Huth @ 2026-03-06 20:50 UTC (permalink / raw)
To: Farhan Ali, Christian Borntraeger, Jared Rossi, Zhuoying Cai,
qemu-devel
Cc: qemu-s390x
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-06 20:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-06 20:36 [PATCH] pc-bios/s390-ccw: Fix compiler warning when compiling with DEBUG enabled Thomas Huth
2026-03-06 20:45 ` Farhan Ali
2026-03-06 20:50 ` Thomas Huth
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.