Skip to content

Commit

Permalink
cpu-exec: Move down some declarations in cpu_exec()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
sergefdrv authored and bonzini committed Jul 17, 2016
1 parent 101420b commit ca7d8e1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cpu-exec.c
Expand Up @@ -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);
Expand Down

0 comments on commit ca7d8e1

Please sign in to comment.