aboutsummaryrefslogtreecommitdiff
path: root/translate-all.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2017-01-08 09:48:34 -0800
committerRichard Henderson <rth@twiddle.net>2017-01-08 09:48:34 -0800
commitf68808c7494b38764e1895a9852b994638b86536 (patch)
treecfba408b2481b4ba406580369cb7d6cbf734e95a /translate-all.c
parentf0d703314ecb0415d51425727ed73ad2c6e3238a (diff)
translate-all: Avoid -Werror=switch-bool
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>
Diffstat (limited to 'translate-all.c')
-rw-r--r--translate-all.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/translate-all.c b/translate-all.c
index 3dd9214904..20262938bb 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. */