From: Jan Kiszka <jan.kiszka@web.de>
To: Mike Frysinger <vapier@gentoo.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] fix warnings from printf target addresses
Date: Sun, 16 Sep 2012 09:31:14 +0200 [thread overview]
Message-ID: <50558042.6030008@web.de> (raw)
In-Reply-To: <1347753913-5305-1-git-send-email-vapier@gentoo.org>
[-- Attachment #1: Type: text/plain, Size: 1686 bytes --]
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 <vapier@gentoo.org>
> ---
> 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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]
next prev parent reply other threads:[~2012-09-16 7:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-16 0:05 [Qemu-devel] [PATCH] fix warnings from printf target addresses Mike Frysinger
2012-09-16 7:24 ` Blue Swirl
2012-09-16 19:38 ` Mike Frysinger
2012-09-16 7:31 ` Jan Kiszka [this message]
2012-09-16 19:46 ` [Qemu-devel] [PATCH] include address in invalid memory region accesses Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50558042.6030008@web.de \
--to=jan.kiszka@web.de \
--cc=qemu-devel@nongnu.org \
--cc=vapier@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.