qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [PATCH] ioapic: fix build with DEBUG_IOAPIC


From: Stefan Hajnoczi
Subject: Re: [Qemu-trivial] [PATCH] ioapic: fix build with DEBUG_IOAPIC
Date: Thu, 15 Mar 2012 08:22:26 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

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 <address@hidden>
> ---
>  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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]