From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, Alexander Graf <agraf@suse.de>
Subject: [Qemu-devel] [PATCH 2/2] target-ppc: Cast ssize_t to size_t before printing with %zx
Date: Tue, 23 Dec 2014 22:22:16 +0000 [thread overview]
Message-ID: <1419373336-17800-3-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1419373336-17800-1-git-send-email-peter.maydell@linaro.org>
The mingw32 compiler complains about trying to print variables of type
ssize_t with the %z format string specifier. Since we're printing it
as unsigned hex anyway, cast to size_t to silence the warning.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
I suspect that this is a compiler bug, but this is the only instance
in the codebase so I'm prepared to work around it to get to a point
where we can turn on warnings-as-errors for w32, because some of the
w32-specific errors really are flagging up issues we need to fix.
---
hw/ppc/spapr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 08401e0..9aaa800 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1438,7 +1438,7 @@ static void ppc_spapr_init(MachineState *machine)
}
if (spapr->rtas_size > RTAS_MAX_SIZE) {
hw_error("RTAS too big ! 0x%zx bytes (max is 0x%x)\n",
- spapr->rtas_size, RTAS_MAX_SIZE);
+ (size_t)spapr->rtas_size, RTAS_MAX_SIZE);
exit(1);
}
g_free(filename);
--
1.9.1
next prev parent reply other threads:[~2014-12-23 22:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-23 22:22 [Qemu-devel] [PATCH 0/2] target-ppc: Fix clang and w32 warnings Peter Maydell
2014-12-23 22:22 ` [Qemu-devel] [PATCH 1/2] target-ppc: Mark SR() and gen_sync_exception() as !CONFIG_USER_ONLY Peter Maydell
2014-12-23 22:22 ` Peter Maydell [this message]
2014-12-23 22:36 ` [Qemu-devel] [PATCH 2/2] target-ppc: Cast ssize_t to size_t before printing with %zx Stefan Weil
2014-12-23 22:47 ` Peter Maydell
2014-12-24 9:47 ` Stefan Weil
2014-12-23 22:50 ` Eric Blake
2014-12-23 23:09 ` Peter Maydell
2014-12-23 23:25 ` [Qemu-devel] [PATCH 0/2] target-ppc: Fix clang and w32 warnings Alexander Graf
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=1419373336-17800-3-git-send-email-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.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 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).