[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 09/12] target/sparc/win_helper: silence the compiler warnings
From: |
Thomas Huth |
Subject: |
[PATCH 09/12] target/sparc/win_helper: silence the compiler warnings |
Date: |
Fri, 11 Dec 2020 16:24:23 +0100 |
From: Chen Qun <kuhn.chenqun@huawei.com>
When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warning:
target/sparc/win_helper.c: In function ‘get_gregset’:
target/sparc/win_helper.c:304:9: warning: this statement may fall through
[-Wimplicit-fallthrough=]
304 | trace_win_helper_gregset_error(pstate);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
target/sparc/win_helper.c:306:5: note: here
306 | case 0:
| ^~~~
Add the corresponding "fall through" comment to fix it.
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.com>
Message-Id: <20201030004046.2191790-7-kuhn.chenqun@huawei.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
target/sparc/win_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/sparc/win_helper.c b/target/sparc/win_helper.c
index 5b57892a10..3a7c0ff943 100644
--- a/target/sparc/win_helper.c
+++ b/target/sparc/win_helper.c
@@ -302,7 +302,7 @@ static inline uint64_t *get_gregset(CPUSPARCState *env,
uint32_t pstate)
switch (pstate) {
default:
trace_win_helper_gregset_error(pstate);
- /* pass through to normal set of global registers */
+ /* fall through to normal set of global registers */
case 0:
return env->bgregs;
case PS_AG:
--
2.27.0
- [PATCH 06/12] hw/intc/arm_gicv3_kvm: silence the compiler warnings, (continued)
- [PATCH 06/12] hw/intc/arm_gicv3_kvm: silence the compiler warnings, Thomas Huth, 2020/12/11
- [PATCH 08/12] target/sparc/translate: silence the compiler warnings, Thomas Huth, 2020/12/11
- [PATCH 10/12] tcg/optimize: Add fallthrough annotations, Thomas Huth, 2020/12/11
- [PATCH 12/12] configure: Compile with -Wimplicit-fallthrough=2, Thomas Huth, 2020/12/11
- [PATCH 11/12] tests/fp: Do not emit implicit-fallthrough warnings in the softfloat tests, Thomas Huth, 2020/12/11
- [PATCH 09/12] target/sparc/win_helper: silence the compiler warnings,
Thomas Huth <=
- Re: [PATCH 00/12] Compile QEMU with -Wimplicit-fallthrough, Thomas Huth, 2020/12/11
- Re: [PATCH 00/12] Compile QEMU with -Wimplicit-fallthrough, no-reply, 2020/12/11