[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 11/11] translate-all: Avoid -Werror=switch-bool
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PULL 11/11] translate-all: Avoid -Werror=switch-bool |
Date: |
Sun, 8 Jan 2017 09:56:20 -0800 |
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 <address@hidden>
---
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
- [Qemu-devel] [PULL 00/11] tcg host mips64 support, Richard Henderson, 2017/01/08
- [Qemu-devel] [PULL 02/11] tcg-mips: Add mips64 opcodes, Richard Henderson, 2017/01/08
- [Qemu-devel] [PULL 04/11] tcg-mips: Add bswap32u and bswap64, Richard Henderson, 2017/01/08
- [Qemu-devel] [PULL 05/11] tcg-mips: Adjust move functions for mips64, Richard Henderson, 2017/01/08
- [Qemu-devel] [PULL 06/11] tcg-mips: Adjust load/store functions for mips64, Richard Henderson, 2017/01/08
- [Qemu-devel] [PULL 08/11] tcg-mips: Add tcg unwind info, Richard Henderson, 2017/01/08
- [Qemu-devel] [PULL 01/11] tcg-mips: Move bswap code to a subroutine, Richard Henderson, 2017/01/08
- [Qemu-devel] [PULL 03/11] tcg-mips: Support 64-bit opcodes, Richard Henderson, 2017/01/08
- [Qemu-devel] [PULL 07/11] tcg-mips: Adjust prologue for mips64, Richard Henderson, 2017/01/08
- [Qemu-devel] [PULL 11/11] translate-all: Avoid -Werror=switch-bool,
Richard Henderson <=
- [Qemu-devel] [PULL 10/11] tcg-mips: Adjust qemu_ld/st for mips64, Richard Henderson, 2017/01/08
- [Qemu-devel] [PULL 09/11] tcg-mips: Adjust calling conventions for mips64, Richard Henderson, 2017/01/08