diff options
author | Sergey Fedorov <serge.fdrv@gmail.com> | 2016-07-15 22:31:23 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-07-17 09:59:22 +0200 |
commit | ca7d8e1c9ccb95257a9c9288617b270727ec3e79 (patch) | |
tree | deded09ddb432fd6e54539bd71e05d82c2a22584 /cpu-exec.c | |
parent | 101420b886eec36990419bc9ed5b503622af8a0d (diff) | |
download | qemu-ca7d8e1c9ccb95257a9c9288617b270727ec3e79.tar.gz qemu-ca7d8e1c9ccb95257a9c9288617b270727ec3e79.tar.bz2 qemu-ca7d8e1c9ccb95257a9c9288617b270727ec3e79.zip |
cpu-exec: Move down some declarations in cpu_exec()
This will fix a compiler warning with -Wclobbered:
http://lists.nongnu.org/archive/html/qemu-devel/2016-07/msg03347.html
Reported-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Sergey Fedorov <serge.fdrv@gmail.com>
Signed-off-by: Sergey Fedorov <sergey.fedorov@linaro.org>
Message-Id: <20160715193123.28113-1-sergey.fedorov@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'cpu-exec.c')
-rw-r--r-- | cpu-exec.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cpu-exec.c b/cpu-exec.c index b840e1d2dd..5d9710a1ea 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); |