qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: Sergey Fedorov <serge.fdrv@gmail.com>,
	Sergey Fedorov <sergey.fedorov@linaro.org>
Subject: [Qemu-devel] [PULL 08/12] cpu-exec: Move down some declarations in cpu_exec()
Date: Tue, 19 Jul 2016 10:34:15 +0200	[thread overview]
Message-ID: <1468917259-8475-9-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1468917259-8475-1-git-send-email-pbonzini@redhat.com>

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>
Message-Id: <20160715193123.28113-1-sergey.fedorov@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 cpu-exec.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/cpu-exec.c b/cpu-exec.c
index b840e1d..5d9710a 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.7.4

  parent reply	other threads:[~2016-07-19  8:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-19  8:34 [Qemu-devel] [PULL v2 00/12] Misc patches for 2.7 hard freeze from 2016-07-18 Paolo Bonzini
2016-07-19  8:34 ` [Qemu-devel] [PULL 01/12] use g_path_get_dirname instead of dirname Paolo Bonzini
2016-07-19  8:34 ` [Qemu-devel] [PULL 02/12] Changed malloc to g_malloc, free to g_free in bsd-user/qemu.h Paolo Bonzini
2016-07-19  8:34 ` [Qemu-devel] [PULL 03/12] hw/i386: add device tree support Paolo Bonzini
2016-07-19  8:34 ` [Qemu-devel] [PULL 04/12] compiler: never omit assertions if using a static analysis tool Paolo Bonzini
2016-07-19  8:34 ` [Qemu-devel] [PULL 05/12] megasas: remove useless check for cmd->frame Paolo Bonzini
2016-07-19  8:34 ` [Qemu-devel] [PULL 06/12] checkpatch: consider git extended headers valid patches Paolo Bonzini
2016-07-19  8:34 ` [Qemu-devel] [PULL 07/12] exec: avoid realloc in phys_map_node_reserve Paolo Bonzini
2016-07-19  8:34 ` Paolo Bonzini [this message]
2016-07-19  8:34 ` [Qemu-devel] [PULL 09/12] Move README to markdown Paolo Bonzini
2016-07-19 15:49   ` Daniel P. Berrange
2016-07-19 18:15     ` Pranith Kumar
2016-07-19 20:54       ` Peter Maydell
2016-07-19  8:34 ` [Qemu-devel] [PULL 10/12] block/iscsi: fix rounding in iscsi_allocationmap_set Paolo Bonzini
2016-07-19  8:34 ` [Qemu-devel] [PULL 11/12] block/iscsi: allow caching of the allocation map Paolo Bonzini
2016-07-19  8:34 ` [Qemu-devel] [PULL 12/12] target-i386: Remove redundant HF_SOFTMMU_MASK Paolo Bonzini
2016-07-19 15:39 ` [Qemu-devel] [PULL v2 00/12] Misc patches for 2.7 hard freeze from 2016-07-18 Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1468917259-8475-9-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=serge.fdrv@gmail.com \
    --cc=sergey.fedorov@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).