diff mbox

[PATCH-v3,2/2] kvm: Fix unused-but-set-variable warning

Message ID 1306828429-9139-3-git-send-email-cfergeau@redhat.com
State New
Headers show

Commit Message

Christophe Fergeau May 31, 2011, 7:53 a.m. UTC
Based on a patch from Hans de Goede <hdegoede@redhat.com>

This warning is new in gcc 4.6.

Acked-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
---
 target-i386/kvm.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Comments

Christophe Fergeau June 10, 2011, 10:43 a.m. UTC | #1
Ping?

On Tue, May 31, 2011 at 09:53:49AM +0200, Christophe Fergeau wrote:
> Based on a patch from Hans de Goede <hdegoede@redhat.com>
> 
> This warning is new in gcc 4.6.
> 
> Acked-by: Amit Shah <amit.shah@redhat.com>
> Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
> ---
>  target-i386/kvm.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/target-i386/kvm.c b/target-i386/kvm.c
> index faedc6c..58a70bc 100644
> --- a/target-i386/kvm.c
> +++ b/target-i386/kvm.c
> @@ -970,7 +970,7 @@ static int kvm_get_xsave(CPUState *env)
>  #ifdef KVM_CAP_XSAVE
>      struct kvm_xsave* xsave;
>      int ret, i;
> -    uint16_t cwd, swd, twd, fop;
> +    uint16_t cwd, swd, twd;
>  
>      if (!kvm_has_xsave()) {
>          return kvm_get_fpu(env);
> @@ -986,7 +986,6 @@ static int kvm_get_xsave(CPUState *env)
>      cwd = (uint16_t)xsave->region[0];
>      swd = (uint16_t)(xsave->region[0] >> 16);
>      twd = (uint16_t)xsave->region[1];
> -    fop = (uint16_t)(xsave->region[1] >> 16);
>      env->fpstt = (swd >> 11) & 7;
>      env->fpus = swd;
>      env->fpuc = cwd;
> -- 
> 1.7.5.2
> 
>
Stefan Hajnoczi June 10, 2011, 12:17 p.m. UTC | #2
On Fri, Jun 10, 2011 at 11:43 AM, Christophe Fergeau
<cfergeau@redhat.com> wrote:
> Ping?

Let me add these patches to the trivial-patches tree since they
haven't been picked up.

Stefan
Stefan Hajnoczi June 10, 2011, 6:46 p.m. UTC | #3
On Tue, May 31, 2011 at 09:53:49AM +0200, Christophe Fergeau wrote:
> Based on a patch from Hans de Goede <hdegoede@redhat.com>
> 
> This warning is new in gcc 4.6.
> 
> Acked-by: Amit Shah <amit.shah@redhat.com>
> Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
> ---
>  target-i386/kvm.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)

Thanks, applied to the trivial patches tree:
http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches

Stefan
Jan Kiszka June 11, 2011, 7:46 a.m. UTC | #4
On 2011-06-10 20:46, Stefan Hajnoczi wrote:
> On Tue, May 31, 2011 at 09:53:49AM +0200, Christophe Fergeau wrote:
>> Based on a patch from Hans de Goede <hdegoede@redhat.com>
>>
>> This warning is new in gcc 4.6.
>>
>> Acked-by: Amit Shah <amit.shah@redhat.com>
>> Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
>> ---
>>  target-i386/kvm.c |    3 +--
>>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> Thanks, applied to the trivial patches tree:
> http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches

Please skip this one. I'll post a patch fixing the issue that this
warning revealed (lacking save/restore of FPU OP, IP and DP).

Jan
Stefan Hajnoczi June 11, 2011, 1:06 p.m. UTC | #5
On Sat, Jun 11, 2011 at 8:46 AM, Jan Kiszka <jan.kiszka@web.de> wrote:
> On 2011-06-10 20:46, Stefan Hajnoczi wrote:
>> On Tue, May 31, 2011 at 09:53:49AM +0200, Christophe Fergeau wrote:
>>> Based on a patch from Hans de Goede <hdegoede@redhat.com>
>>>
>>> This warning is new in gcc 4.6.
>>>
>>> Acked-by: Amit Shah <amit.shah@redhat.com>
>>> Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
>>> ---
>>>  target-i386/kvm.c |    3 +--
>>>  1 files changed, 1 insertions(+), 2 deletions(-)
>>
>> Thanks, applied to the trivial patches tree:
>> http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches
>
> Please skip this one. I'll post a patch fixing the issue that this
> warning revealed (lacking save/restore of FPU OP, IP and DP).

Okay, dropped from trivial-patches in favor of Jan's fix.

Stefan
Christophe Fergeau June 14, 2011, 7:50 p.m. UTC | #6
On Sat, Jun 11, 2011 at 02:06:00PM +0100, Stefan Hajnoczi wrote:
> On Sat, Jun 11, 2011 at 8:46 AM, Jan Kiszka <jan.kiszka@web.de> wrote:
> > Please skip this one. I'll post a patch fixing the issue that this
> > warning revealed (lacking save/restore of FPU OP, IP and DP).
> 
> Okay, dropped from trivial-patches in favor of Jan's fix.

Great, thanks to all!

Christophe
> 
> Stefan
diff mbox

Patch

diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index faedc6c..58a70bc 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -970,7 +970,7 @@  static int kvm_get_xsave(CPUState *env)
 #ifdef KVM_CAP_XSAVE
     struct kvm_xsave* xsave;
     int ret, i;
-    uint16_t cwd, swd, twd, fop;
+    uint16_t cwd, swd, twd;
 
     if (!kvm_has_xsave()) {
         return kvm_get_fpu(env);
@@ -986,7 +986,6 @@  static int kvm_get_xsave(CPUState *env)
     cwd = (uint16_t)xsave->region[0];
     swd = (uint16_t)(xsave->region[0] >> 16);
     twd = (uint16_t)xsave->region[1];
-    fop = (uint16_t)(xsave->region[1] >> 16);
     env->fpstt = (swd >> 11) & 7;
     env->fpus = swd;
     env->fpuc = cwd;