From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42892) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bO8pr-0006jy-GB for qemu-devel@nongnu.org; Fri, 15 Jul 2016 15:31:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bO8pn-00039M-AY for qemu-devel@nongnu.org; Fri, 15 Jul 2016 15:31:42 -0400 Received: from mail-lf0-x229.google.com ([2a00:1450:4010:c07::229]:35251) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bO8pm-000399-PW for qemu-devel@nongnu.org; Fri, 15 Jul 2016 15:31:39 -0400 Received: by mail-lf0-x229.google.com with SMTP id f93so94930292lfi.2 for ; Fri, 15 Jul 2016 12:31:38 -0700 (PDT) From: Sergey Fedorov Date: Fri, 15 Jul 2016 22:31:23 +0300 Message-Id: <20160715193123.28113-1-sergey.fedorov@linaro.org> Subject: [Qemu-devel] [PATCH] cpu-exec: Move down some declarations in cpu_exec() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Stefan Weil , Sergey Fedorov , Sergey Fedorov , Paolo Bonzini , Peter Crosthwaite , Richard Henderson From: Sergey Fedorov This will fix a compiler warning with -Wclobbered: http://lists.nongnu.org/archive/html/qemu-devel/2016-07/msg03347.html Reported-by: Stefan Weil Signed-off-by: Sergey Fedorov Signed-off-by: Sergey Fedorov --- cpu-exec.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index b840e1d2dd41..5d9710a1eaf2 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -608,17 +608,16 @@ int cpu_exec(CPUState *cpu) init_delay_params(&sc, cpu); for(;;) { - TranslationBlock *tb, *last_tb; - int tb_exit = 0; - /* prepare setjmp context for exception handling */ if (sigsetjmp(cpu->jmp_env, 0) == 0) { + TranslationBlock *tb, *last_tb = NULL; + int tb_exit = 0; + /* if an exception is pending, we execute it here */ if (cpu_handle_exception(cpu, &ret)) { break; } - last_tb = NULL; /* forget the last executed TB after exception */ cpu->tb_flushed = false; /* reset before first TB lookup */ for(;;) { cpu_handle_interrupt(cpu, &last_tb); -- 2.9.1