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 <r...@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