qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] fix warnings from printf target addresses


From: Jan Kiszka
Subject: Re: [Qemu-devel] [PATCH] fix warnings from printf target addresses
Date: Sun, 16 Sep 2012 09:31:14 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

On 2012-09-16 02:05, Mike Frysinger wrote:
> Current code triggers:
> memory.c: In function 'invalid_read':
> memory.c:1001: warning: format '%#x' expects type 'unsigned int',
>       but argument 4 has type 'target_phys_addr_t'
> memory.c: In function 'invalid_write':
> memory.c:1013: warning: format '%#x' expects type 'unsigned int',
>       but argument 4 has type 'target_phys_addr_t'

This version was never in git. Which QEMU are you patching, a local one?

Jan

> 
> Signed-off-by: Mike Frysinger <address@hidden>
> ---
>  memory.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/memory.c b/memory.c
> index 58a242d..7d5f4a3 100644
> --- a/memory.c
> +++ b/memory.c
> @@ -998,7 +998,8 @@ static uint64_t invalid_read(void *opaque, 
> target_phys_addr_t addr,
>      MemoryRegion *mr = opaque;
>  
>      if (!mr->warning_printed) {
> -        fprintf(stderr, "Invalid read from memory region %s at offset 
> %#x\n", mr->name, addr);
> +        fprintf(stderr, "Invalid read from memory region %s at offset 
> %#llx\n",
> +                mr->name, (unsigned long long)addr);
>          mr->warning_printed = true;
>      }
>      return -1U;
> @@ -1010,7 +1011,8 @@ static void invalid_write(void *opaque, 
> target_phys_addr_t addr, uint64_t data,
>      MemoryRegion *mr = opaque;
>  
>      if (!mr->warning_printed) {
> -        fprintf(stderr, "Invalid write to memory region %s at offset %#x\n", 
> mr->name, addr);
> +        fprintf(stderr, "Invalid write to memory region %s at offset 
> %#llx\n",
> +                mr->name, (unsigned long long)addr);
>          mr->warning_printed = true;
>      }
>  }
> 


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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