From: Stefan Weil <sw@weilnetz.de>
To: Richard Henderson <richard.henderson@linaro.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Eduardo Habkost <ehabkost@redhat.com>,
qemu-trivial@nongnu.org
Cc: qemu-devel@nongnu.org, Stefan Weil <sw@weilnetz.de>
Subject: [Qemu-devel] [PATCH for 2.12] target/i386: Fix compiler warnings
Date: Mon, 13 Nov 2017 07:48:45 +0100 [thread overview]
Message-ID: <20171113064845.29142-1-sw@weilnetz.de> (raw)
These gcc warnings are fixed:
target/i386/translate.c:4461:12: warning:
variable ‘prefixes’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
target/i386/translate.c:4466:9: warning:
variable ‘rex_w’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
target/i386/translate.c:4466:16: warning:
variable ‘rex_r’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
Tested with x86_64-w64-mingw32-gcc from Debian stretch.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
target/i386/translate.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/target/i386/translate.c b/target/i386/translate.c
index 088a9d9766..f410938244 100644
--- a/target/i386/translate.c
+++ b/target/i386/translate.c
@@ -4467,10 +4467,7 @@ static target_ulong disas_insn(DisasContext *s, CPUState *cpu)
target_ulong pc_start = s->base.pc_next;
s->pc_start = s->pc = pc_start;
- prefixes = 0;
s->override = -1;
- rex_w = -1;
- rex_r = 0;
#ifdef TARGET_X86_64
s->rex_x = 0;
s->rex_b = 0;
@@ -4484,6 +4481,10 @@ static target_ulong disas_insn(DisasContext *s, CPUState *cpu)
return s->pc;
}
+ prefixes = 0;
+ rex_w = -1;
+ rex_r = 0;
+
next_byte:
b = x86_ldub_code(env, s);
/* Collect prefixes. */
--
2.11.0
next reply other threads:[~2017-11-13 6:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-13 6:48 Stefan Weil [this message]
2017-12-11 16:38 ` [Qemu-devel] [PATCH for 2.12] target/i386: Fix compiler warnings Paolo Bonzini
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=20171113064845.29142-1-sw@weilnetz.de \
--to=sw@weilnetz.de \
--cc=ehabkost@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=richard.henderson@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).