diff options
author | Stefan Weil <sw@weilnetz.de> | 2017-11-13 07:48:45 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-12-21 09:22:44 +0100 |
commit | a4926d99129a1d8072fc4681cd4efdb214f65ed4 (patch) | |
tree | 5853f72e28205dc2109250d17c152f6169454a6b /target/i386 | |
parent | d84be02d69a23dea249f351324d497f613994129 (diff) | |
download | qemu-a4926d99129a1d8072fc4681cd4efdb214f65ed4.zip qemu-a4926d99129a1d8072fc4681cd4efdb214f65ed4.tar.gz qemu-a4926d99129a1d8072fc4681cd4efdb214f65ed4.tar.bz2 |
target/i386: Fix compiler warnings
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>
Message-Id: <20171113064845.29142-1-sw@weilnetz.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/i386')
-rw-r--r-- | target/i386/translate.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/target/i386/translate.c b/target/i386/translate.c index 088a9d9..f410938 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. */ |