qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefan Weil <sw@weilnetz.de>,
	Richard Henderson <richard.henderson@linaro.org>,
	Eduardo Habkost <ehabkost@redhat.com>,
	qemu-trivial@nongnu.org
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH for 2.12] target/i386: Fix compiler warnings
Date: Mon, 11 Dec 2017 17:38:23 +0100	[thread overview]
Message-ID: <c3436f32-29b6-9fb9-c718-4db3cc9330c8@redhat.com> (raw)
In-Reply-To: <20171113064845.29142-1-sw@weilnetz.de>

On 13/11/2017 07:48, Stefan Weil wrote:
> 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.  */
> 

Queued, thanks.

Paolo

      reply	other threads:[~2017-12-11 16:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-13  6:48 [Qemu-devel] [PATCH for 2.12] target/i386: Fix compiler warnings Stefan Weil
2017-12-11 16:38 ` Paolo Bonzini [this message]

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=c3436f32-29b6-9fb9-c718-4db3cc9330c8@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=sw@weilnetz.de \
    /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).