[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/9] accel/tcg/user-exec: silence the compiler warnings
From: |
Chen Qun |
Subject: |
[PATCH 3/9] accel/tcg/user-exec: silence the compiler warnings |
Date: |
Wed, 28 Oct 2020 12:18:13 +0800 |
When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warning:
../accel/tcg/user-exec.c: In function ‘handle_cpu_signal’:
../accel/tcg/user-exec.c:169:13: warning: this statement may fall through
[-Wimplicit-fallthrough=]
169 | cpu_exit_tb_from_sighandler(cpu, old_set);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../accel/tcg/user-exec.c:172:9: note: here
172 | default:
This exception branch fall through the 'default' branch and run the
'g_assert_not_reached' statement.
So we could use "fall through" instead of "NORETURN" here.
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
---
Cc: Riku Voipio <riku.voipio@iki.fi>
Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
---
accel/tcg/user-exec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c
index 4ebe25461a..330468e990 100644
--- a/accel/tcg/user-exec.c
+++ b/accel/tcg/user-exec.c
@@ -167,7 +167,7 @@ static inline int handle_cpu_signal(uintptr_t pc, siginfo_t
*info,
*/
clear_helper_retaddr();
cpu_exit_tb_from_sighandler(cpu, old_set);
- /* NORETURN */
+ /* fall through */
default:
g_assert_not_reached();
--
2.27.0
- Re: [PATCH 8/9] target/ppc: silence the compiler warnings, (continued)
[PATCH 9/9] hw/timer/renesas_tmr: silence the compiler warnings, Chen Qun, 2020/10/28
RE: [PATCH 9/9] hw/timer/renesas_tmr: silence the compiler warnings, Chenqun (kuhn), 2020/10/29
[PATCH 3/9] accel/tcg/user-exec: silence the compiler warnings,
Chen Qun <=