From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org
Subject: [Qemu-devel] [PULL 11/11] translate-all: Avoid -Werror=switch-bool
Date: Sun, 8 Jan 2017 09:56:20 -0800 [thread overview]
Message-ID: <20170108175620.6605-12-rth@twiddle.net> (raw)
In-Reply-To: <20170108175620.6605-1-rth@twiddle.net>
gcc 5.3.0 diagnoses
translate-all.c: In function ‘alloc_code_gen_buffer’:
translate-all.c:756:17: error: switch condition has boolean value
switch (buf2 != MAP_FAILED) {
^
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
translate-all.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/translate-all.c b/translate-all.c
index 3dd9214..2026293 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -753,7 +753,7 @@ static inline void *alloc_code_gen_buffer(void)
size_t size2;
void *buf2 = mmap(NULL, size + qemu_real_host_page_size,
PROT_NONE, flags, -1, 0);
- switch (buf2 != MAP_FAILED) {
+ switch ((int)(buf2 != MAP_FAILED)) {
case 1:
if (!cross_256mb(buf2, size)) {
/* Success! Use the new buffer. */
--
2.9.3
prev parent reply other threads:[~2017-01-08 17:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-08 17:56 [Qemu-devel] [PULL 00/11] tcg host mips64 support Richard Henderson
2017-01-08 17:56 ` [Qemu-devel] [PULL 01/11] tcg-mips: Move bswap code to a subroutine Richard Henderson
2017-01-08 17:56 ` [Qemu-devel] [PULL 02/11] tcg-mips: Add mips64 opcodes Richard Henderson
2017-01-08 17:56 ` [Qemu-devel] [PULL 03/11] tcg-mips: Support 64-bit opcodes Richard Henderson
2017-01-08 17:56 ` [Qemu-devel] [PULL 04/11] tcg-mips: Add bswap32u and bswap64 Richard Henderson
2017-01-08 17:56 ` [Qemu-devel] [PULL 05/11] tcg-mips: Adjust move functions for mips64 Richard Henderson
2017-01-08 17:56 ` [Qemu-devel] [PULL 06/11] tcg-mips: Adjust load/store " Richard Henderson
2017-01-08 17:56 ` [Qemu-devel] [PULL 07/11] tcg-mips: Adjust prologue " Richard Henderson
2017-01-08 17:56 ` [Qemu-devel] [PULL 08/11] tcg-mips: Add tcg unwind info Richard Henderson
2017-01-08 17:56 ` [Qemu-devel] [PULL 09/11] tcg-mips: Adjust calling conventions for mips64 Richard Henderson
2017-01-08 17:56 ` [Qemu-devel] [PULL 10/11] tcg-mips: Adjust qemu_ld/st " Richard Henderson
2017-01-08 17:56 ` Richard Henderson [this message]
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=20170108175620.6605-12-rth@twiddle.net \
--to=rth@twiddle.net \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@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).