qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] cpu-exec: Move down some declarations in cpu_ex


From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH] cpu-exec: Move down some declarations in cpu_exec()
Date: Fri, 15 Jul 2016 22:44:08 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.1.0

Am 15.07.2016 um 21:31 schrieb Sergey Fedorov:
> From: Sergey Fedorov <address@hidden>
> 
> This will fix a compiler warning with -Wclobbered:
> 
> http://lists.nongnu.org/archive/html/qemu-devel/2016-07/msg03347.html
> 
> Reported-by: Stefan Weil <address@hidden>
> Signed-off-by: Sergey Fedorov <address@hidden>
> Signed-off-by: Sergey Fedorov <address@hidden>
> ---
>  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);
> 

Reviewed-by: Stefan Weil <address@hidden>

Thanks.


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]