]> Git Repo - qemu.git/commitdiff
accel/tcg/user-exec: silence the compiler warnings
authorChen Qun <[email protected]>
Fri, 11 Dec 2020 15:24:21 +0000 (16:24 +0100)
committerThomas Huth <[email protected]>
Fri, 18 Dec 2020 08:14:23 +0000 (09:14 +0100)
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 <[email protected]>
Signed-off-by: Chen Qun <[email protected]>
Signed-off-by: Thomas Huth <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Thomas Huth <[email protected]>
Reviewed-by: Alex Bennée <[email protected]>
Message-Id: <20201211152426[email protected]>
Signed-off-by: Thomas Huth <[email protected]>
accel/tcg/user-exec.c

index 4ebe25461af44bafb9aef0f6aaa2c498411fa014..293ee86ea44601be5b2a123823504a10a6d78acd 100644 (file)
@@ -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);
This page took 0.029453 seconds and 4 git commands to generate.