From: Chen Qun Date: Fri, 11 Dec 2020 15:24:22 +0000 (+0100) Subject: target/sparc/translate: silence the compiler warnings X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=fc0cd867819a5cff9dd49b2fca4d927d765aa7ae;p=qmiga%2Fqemu.git target/sparc/translate: silence the compiler warnings 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 Signed-off-by: Chen Qun Signed-off-by: Thomas Huth Reviewed-by: Artyom Tarasenko Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20201211152426.350966-9-thuth@redhat.com> Signed-off-by: Thomas Huth --- diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 30c73f8d2e..4bfa3179f8 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);