[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 07/12] accel/tcg/user-exec: silence the compiler warnings
From: |
Thomas Huth |
Subject: |
[PATCH 07/12] accel/tcg/user-exec: silence the compiler warnings |
Date: |
Fri, 11 Dec 2020 16:24:21 +0100 |
From: Chen Qun <kuhn.chenqun@huawei.com>
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:
Mark the cpu_exit_tb_from_sighandler() function with QEMU_NORETURN to fix it.
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20201030004046.2191790-4-kuhn.chenqun@huawei.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
accel/tcg/user-exec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c
index 4ebe25461a..293ee86ea4 100644
--- a/accel/tcg/user-exec.c
+++ b/accel/tcg/user-exec.c
@@ -49,7 +49,8 @@ __thread uintptr_t helper_retaddr;
/* exit the current TB from a signal handler. The host registers are
restored in a state compatible with the CPU emulator
*/
-static void cpu_exit_tb_from_sighandler(CPUState *cpu, sigset_t *old_set)
+static void QEMU_NORETURN cpu_exit_tb_from_sighandler(CPUState *cpu,
+ sigset_t *old_set)
{
/* XXX: use siglongjmp ? */
sigprocmask(SIG_SETMASK, old_set, NULL);
--
2.27.0
- [PATCH 00/12] Compile QEMU with -Wimplicit-fallthrough, Thomas Huth, 2020/12/11
- [PATCH 01/12] disas/libvixl: Fix fall-through annotation for GCC >= 7, Thomas Huth, 2020/12/11
- [PATCH 03/12] hw/rtc/twl92230: Silence warnings about missing fallthrough statements, Thomas Huth, 2020/12/11
- [PATCH 02/12] target/unicore32/translate: Add missing fallthrough annotations, Thomas Huth, 2020/12/11
- [PATCH 04/12] hw/timer/renesas_tmr: silence the compiler warnings, Thomas Huth, 2020/12/11
- [PATCH 05/12] target/i386: silence the compiler warnings in gen_shiftd_rm_T1, Thomas Huth, 2020/12/11
- [PATCH 07/12] accel/tcg/user-exec: silence the compiler warnings,
Thomas Huth <=
- [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