[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 1/9] arm/translate-a64: mark path as unreachable to e
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 1/9] arm/translate-a64: mark path as unreachable to eliminate warning |
Date: |
Mon, 13 Nov 2017 14:11:36 +0000 |
From: "Emilio G. Cota" <address@hidden>
Fixes the following warning when compiling with gcc 5.4.0 with -O1
optimizations and --enable-debug:
target/arm/translate-a64.c: In function ‘aarch64_tr_translate_insn’:
target/arm/translate-a64.c:2361:8: error: ‘post_index’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
if (!post_index) {
^
target/arm/translate-a64.c:2307:10: note: ‘post_index’ was declared here
bool post_index;
^
target/arm/translate-a64.c:2386:8: error: ‘writeback’ may be used uninitialized
in this function [-Werror=maybe-uninitialized]
if (writeback) {
^
target/arm/translate-a64.c:2308:10: note: ‘writeback’ was declared here
bool writeback;
^
Note that idx comes from selecting 2 bits, and therefore its value
can be at most 3.
Signed-off-by: Emilio G. Cota <address@hidden>
Acked-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
---
target/arm/translate-a64.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
index caca05a..625ef2d 100644
--- a/target/arm/translate-a64.c
+++ b/target/arm/translate-a64.c
@@ -2351,6 +2351,8 @@ static void disas_ldst_reg_imm9(DisasContext *s, uint32_t
insn,
post_index = false;
writeback = true;
break;
+ default:
+ g_assert_not_reached();
}
if (rn == 31) {
--
2.7.4
- [Qemu-devel] [PULL 0/9] target-arm queue, Peter Maydell, 2017/11/13
- [Qemu-devel] [PULL 6/9] xlnx-zcu102: Add an info message deprecating the EP108, Peter Maydell, 2017/11/13
- [Qemu-devel] [PULL 7/9] xlnx-zcu102: Specify the max number of CPUs for the EP108, Peter Maydell, 2017/11/13
- [Qemu-devel] [PULL 9/9] accel/tcg/translate-all: expand cpu_restore_state addr check, Peter Maydell, 2017/11/13
- [Qemu-devel] [PULL 8/9] hw: add .min_cpus and .default_cpus fields to machine_class, Peter Maydell, 2017/11/13
- [Qemu-devel] [PULL 3/9] MAINTAINERS: Add entries for Smartfusion2, Peter Maydell, 2017/11/13
- [Qemu-devel] [PULL 4/9] qom: move CPUClass.tcg_initialize to a global, Peter Maydell, 2017/11/13
- [Qemu-devel] [PULL 5/9] xlnx-zynqmp: Properly support the smp command line option, Peter Maydell, 2017/11/13
- [Qemu-devel] [PULL 2/9] highbank: validate register offset before access, Peter Maydell, 2017/11/13
- [Qemu-devel] [PULL 1/9] arm/translate-a64: mark path as unreachable to eliminate warning,
Peter Maydell <=
- Re: [Qemu-devel] [PULL 0/9] target-arm queue, Peter Maydell, 2017/11/14