All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] cpu-exec: Move down some declarations in cpu_exec()
@ 2016-07-15 19:31 Sergey Fedorov
  2016-07-15 20:44 ` Stefan Weil
  0 siblings, 1 reply; 2+ messages in thread
From: Sergey Fedorov @ 2016-07-15 19:31 UTC (permalink / raw)
  To: qemu-devel
  Cc: Stefan Weil, Sergey Fedorov, Sergey Fedorov, Paolo Bonzini,
	Peter Crosthwaite, Richard Henderson

From: Sergey Fedorov <serge.fdrv@gmail.com>

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>
---
 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] cpu-exec: Move down some declarations in cpu_exec()
  2016-07-15 19:31 [Qemu-devel] [PATCH] cpu-exec: Move down some declarations in cpu_exec() Sergey Fedorov
@ 2016-07-15 20:44 ` Stefan Weil
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Weil @ 2016-07-15 20:44 UTC (permalink / raw)
  To: Sergey Fedorov, qemu-devel
  Cc: Sergey Fedorov, Paolo Bonzini, Peter Crosthwaite, Richard Henderson

[-- Attachment #1: Type: text/plain, Size: 1487 bytes --]

Am 15.07.2016 um 21:31 schrieb Sergey Fedorov:
> From: Sergey Fedorov <serge.fdrv@gmail.com>
> 
> 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>
> ---
>  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 <sw@weilnetz.de>

Thanks.



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-07-15 20:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-15 19:31 [Qemu-devel] [PATCH] cpu-exec: Move down some declarations in cpu_exec() Sergey Fedorov
2016-07-15 20:44 ` Stefan Weil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.