[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 5/8] target/sparc/translate: silence the compiler warnings
From: |
Chen Qun |
Subject: |
[PATCH v2 5/8] target/sparc/translate: silence the compiler warnings |
Date: |
Fri, 30 Oct 2020 08:40:43 +0800 |
When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warning:
target/sparc/translate.c: In function ‘gen_st_asi’:
target/sparc/translate.c:2320:12: warning: this statement may fall through
[-Wimplicit-fallthrough=]
2320 | if (!(dc->def->features & CPU_FEATURE_HYPV)) {
| ^
target/sparc/translate.c:2329:5: note: here
2329 | case GET_ASI_DIRECT:
| ^~~~
The "fall through" statement place is not correctly identified by the compiler.
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: Artyom Tarasenko <atar4qemu@gmail.com>
---
target/sparc/translate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/sparc/translate.c b/target/sparc/translate.c
index 1a4efd4ed6..a3d9aaa46b 100644
--- a/target/sparc/translate.c
+++ b/target/sparc/translate.c
@@ -2324,8 +2324,8 @@ static void gen_st_asi(DisasContext *dc, TCGv src, TCGv
addr,
}
/* in OpenSPARC T1+ CPUs TWINX ASIs in store instructions
* are ST_BLKINIT_ ASIs */
- /* fall through */
#endif
+ /* fall through */
case GET_ASI_DIRECT:
gen_address_mask(dc, addr);
tcg_gen_qemu_st_tl(src, addr, da.mem_idx, da.memop);
--
2.27.0
- [PATCH v2 3/8] accel/tcg/user-exec: silence the compiler warnings, (continued)
- [PATCH v2 3/8] accel/tcg/user-exec: silence the compiler warnings, Chen Qun, 2020/10/29
- [PATCH v2 1/8] target/i386: silence the compiler warnings in gen_shiftd_rm_T1, Chen Qun, 2020/10/29
- [PATCH v2 8/8] target/ppc: replaced the TODO with LOG_UNIMP and add break for silence warnings, Chen Qun, 2020/10/29
- [PATCH v2 2/8] hw/intc/arm_gicv3_kvm: silence the compiler warnings, Chen Qun, 2020/10/29
- [PATCH v2 5/8] target/sparc/translate: silence the compiler warnings,
Chen Qun <=
- [PATCH v2 7/8] ppc: Add a missing break for PPC6xx_INPUT_TBEN, Chen Qun, 2020/10/29
- [PATCH v2 6/8] target/sparc/win_helper: silence the compiler warnings, Chen Qun, 2020/10/29