[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] fix warnings from printf target addresses
From: |
Mike Frysinger |
Subject: |
Re: [Qemu-devel] [PATCH] fix warnings from printf target addresses |
Date: |
Sun, 16 Sep 2012 15:38:55 -0400 |
User-agent: |
KMail/1.13.7 (Linux/3.5.0; KDE/4.6.5; x86_64; ; ) |
On Sunday 16 September 2012 03:24:22 Blue Swirl wrote:
> On Sun, Sep 16, 2012 at 12:05 AM, 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'
> >
> > - 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);
>
> The right way is not adding potentially dangerous casts
they're not dangerous here at all
> but using TARGET_PRIxPHYS or TARGET_FMT_plx.
np. i just copied what was already in memory.c, but i guess that's broken
too.
-mike
signature.asc
Description: This is a digitally signed message part.