* [Qemu-devel] [PATCH] ioapic: fix build with DEBUG_IOAPIC
@ 2012-03-08 2:05 Jason Wang
2012-03-15 8:22 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
0 siblings, 1 reply; 2+ messages in thread
From: Jason Wang @ 2012-03-08 2:05 UTC (permalink / raw)
To: qemu-trivial, qemu-devel
ioapic.c:198: error: format ‘%08x’ expects type ‘unsigned int’, but argument 3 has type ‘uint64_t’
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
hw/ioapic.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hw/ioapic.c b/hw/ioapic.c
index 3fee011..2b0e6e9 100644
--- a/hw/ioapic.c
+++ b/hw/ioapic.c
@@ -195,7 +195,7 @@ ioapic_mem_write(void *opaque, target_phys_addr_t addr, uint64_t val,
if (size != 4) {
break;
}
- DPRINTF("write: %08x = %08x\n", s->ioregsel, val);
+ DPRINTF("write: %08x = %lx\n", s->ioregsel, val);
switch (s->ioregsel) {
case IOAPIC_REG_ID:
s->id = (val >> IOAPIC_ID_SHIFT) & IOAPIC_ID_MASK;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH] ioapic: fix build with DEBUG_IOAPIC
2012-03-08 2:05 [Qemu-devel] [PATCH] ioapic: fix build with DEBUG_IOAPIC Jason Wang
@ 2012-03-15 8:22 ` Stefan Hajnoczi
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2012-03-15 8:22 UTC (permalink / raw)
To: Jason Wang; +Cc: qemu-trivial, qemu-devel
On Thu, Mar 08, 2012 at 10:05:22AM +0800, Jason Wang wrote:
> ioapic.c:198: error: format ‘%08x’ expects type ‘unsigned int’, but argument 3 has type ‘uint64_t’
>
> Signed-off-by: Jason Wang <jasowang@redhat.com>
> ---
> hw/ioapic.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/hw/ioapic.c b/hw/ioapic.c
> index 3fee011..2b0e6e9 100644
> --- a/hw/ioapic.c
> +++ b/hw/ioapic.c
> @@ -195,7 +195,7 @@ ioapic_mem_write(void *opaque, target_phys_addr_t addr, uint64_t val,
> if (size != 4) {
> break;
> }
> - DPRINTF("write: %08x = %08x\n", s->ioregsel, val);
> + DPRINTF("write: %08x = %lx\n", s->ioregsel, val);
Please use PRIx64 since the argument is uint64_t. On a 32-bit host the
%lx format string will be wrong and the compiler may issue a warning.
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-15 9:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-08 2:05 [Qemu-devel] [PATCH] ioapic: fix build with DEBUG_IOAPIC Jason Wang
2012-03-15 8:22 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).