All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix a number of unused-but-set-variable warnings (new with gcc-4.6)
@ 2011-05-03 11:03 Hans de Goede
  2011-05-17 11:25 ` Christophe Fergeau
  2011-05-27 10:34 ` Amit Shah
  0 siblings, 2 replies; 23+ messages in thread
From: Hans de Goede @ 2011-05-03 11:03 UTC (permalink / raw)
  To: qemu-devel; +Cc: Hans de Goede

---
 target-i386/kvm.c |    4 ++--
 tcg/tcg.c         |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index a13599d..e9e8d54 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -950,7 +950,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);
@@ -966,7 +966,7 @@ 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);
+    /* fop = (uint16_t)(xsave->region[1] >> 16); */
     env->fpstt = (swd >> 11) & 7;
     env->fpus = swd;
     env->fpuc = cwd;
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 8748c05..11a8daf 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -585,7 +585,7 @@ void tcg_register_helper(void *func, const char *name)
 void tcg_gen_callN(TCGContext *s, TCGv_ptr func, unsigned int flags,
                    int sizemask, TCGArg ret, int nargs, TCGArg *args)
 {
-#ifdef TCG_TARGET_I386
+#if defined TCG_TARGET_I386 && TCG_TARGET_REG_BITS < 64 
     int call_type;
 #endif
     int i;
@@ -612,7 +612,7 @@ void tcg_gen_callN(TCGContext *s, TCGv_ptr func, unsigned int flags,
 
     *gen_opc_ptr++ = INDEX_op_call;
     nparam = gen_opparam_ptr++;
-#ifdef TCG_TARGET_I386
+#if defined TCG_TARGET_I386 && TCG_TARGET_REG_BITS < 64 
     call_type = (flags & TCG_CALL_TYPE_MASK);
 #endif
     if (ret != TCG_CALL_DUMMY_ARG) {
-- 
1.7.5

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix a number of unused-but-set-variable warnings (new with gcc-4.6)
  2011-05-03 11:03 [Qemu-devel] [PATCH] Fix a number of unused-but-set-variable warnings (new with gcc-4.6) Hans de Goede
@ 2011-05-17 11:25 ` Christophe Fergeau
  2011-05-17 17:51   ` Aurelien Jarno
  2011-05-27 10:34 ` Amit Shah
  1 sibling, 1 reply; 23+ messages in thread
From: Christophe Fergeau @ 2011-05-17 11:25 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1684 bytes --]

Hi Hans,

On Tue, May 03, 2011 at 01:03:40PM +0200, Hans de Goede wrote:
> diff --git a/target-i386/kvm.c b/target-i386/kvm.c
> index a13599d..e9e8d54 100644
> --- a/target-i386/kvm.c
> +++ b/target-i386/kvm.c
> @@ -950,7 +950,7 @@ static int kvm_get_xsave(CPUState *env)
> @@ -966,7 +966,7 @@ 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);
> +    /* fop = (uint16_t)(xsave->region[1] >> 16); */

Wouldn't it be better to drop this line?

>      env->fpstt = (swd >> 11) & 7;
>      env->fpus = swd;
>      env->fpuc = cwd;
> diff --git a/tcg/tcg.c b/tcg/tcg.c
> index 8748c05..11a8daf 100644
> --- a/tcg/tcg.c
> +++ b/tcg/tcg.c
> @@ -585,7 +585,7 @@ void tcg_register_helper(void *func, const char *name)
>  void tcg_gen_callN(TCGContext *s, TCGv_ptr func, unsigned int flags,
>                     int sizemask, TCGArg ret, int nargs, TCGArg *args)
>  {
> -#ifdef TCG_TARGET_I386
> +#if defined TCG_TARGET_I386 && TCG_TARGET_REG_BITS < 64 

This function uses #if defined(TCG_TARGET_I386) in other places, so I'd use
parentheses here for consistency.

>      int call_type;
>  #endif
>      int i;
> @@ -612,7 +612,7 @@ void tcg_gen_callN(TCGContext *s, TCGv_ptr func, unsigned int flags,
>  
>      *gen_opc_ptr++ = INDEX_op_call;
>      nparam = gen_opparam_ptr++;
> -#ifdef TCG_TARGET_I386
> +#if defined TCG_TARGET_I386 && TCG_TARGET_REG_BITS < 64 

Same here.

Apart from that, I also need this patch to be able to build qemu on fedora
15 :)

Christophe

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix a number of unused-but-set-variable warnings (new with gcc-4.6)
  2011-05-17 11:25 ` Christophe Fergeau
@ 2011-05-17 17:51   ` Aurelien Jarno
  0 siblings, 0 replies; 23+ messages in thread
From: Aurelien Jarno @ 2011-05-17 17:51 UTC (permalink / raw)
  To: Hans de Goede; +Cc: qemu-devel

On Tue, May 17, 2011 at 01:25:10PM +0200, Christophe Fergeau wrote:
> Hi Hans,
> 
> On Tue, May 03, 2011 at 01:03:40PM +0200, Hans de Goede wrote:
> > diff --git a/target-i386/kvm.c b/target-i386/kvm.c
> > index a13599d..e9e8d54 100644
> > --- a/target-i386/kvm.c
> > +++ b/target-i386/kvm.c
> > @@ -950,7 +950,7 @@ static int kvm_get_xsave(CPUState *env)
> > @@ -966,7 +966,7 @@ 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);
> > +    /* fop = (uint16_t)(xsave->region[1] >> 16); */
> 
> Wouldn't it be better to drop this line?
> 
> >      env->fpstt = (swd >> 11) & 7;
> >      env->fpus = swd;
> >      env->fpuc = cwd;
> > diff --git a/tcg/tcg.c b/tcg/tcg.c
> > index 8748c05..11a8daf 100644
> > --- a/tcg/tcg.c
> > +++ b/tcg/tcg.c
> > @@ -585,7 +585,7 @@ void tcg_register_helper(void *func, const char *name)
> >  void tcg_gen_callN(TCGContext *s, TCGv_ptr func, unsigned int flags,
> >                     int sizemask, TCGArg ret, int nargs, TCGArg *args)
> >  {
> > -#ifdef TCG_TARGET_I386
> > +#if defined TCG_TARGET_I386 && TCG_TARGET_REG_BITS < 64 
> 
> This function uses #if defined(TCG_TARGET_I386) in other places, so I'd use
> parentheses here for consistency.
> 
> >      int call_type;
> >  #endif
> >      int i;
> > @@ -612,7 +612,7 @@ void tcg_gen_callN(TCGContext *s, TCGv_ptr func, unsigned int flags,
> >  
> >      *gen_opc_ptr++ = INDEX_op_call;
> >      nparam = gen_opparam_ptr++;
> > -#ifdef TCG_TARGET_I386
> > +#if defined TCG_TARGET_I386 && TCG_TARGET_REG_BITS < 64 
> 
> Same here.
> 
> Apart from that, I also need this patch to be able to build qemu on fedora
> 15 :)
> 

You should also probably split the patch in two parts, as it touch
totally different parts of QEMU, and thus is going to be
reviewed/applied by different person. I am fine with the TCG part after
the comments from Christophe, so I'll apply it as soon as the new
version is out.

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix a number of unused-but-set-variable warnings (new with gcc-4.6)
  2011-05-03 11:03 [Qemu-devel] [PATCH] Fix a number of unused-but-set-variable warnings (new with gcc-4.6) Hans de Goede
  2011-05-17 11:25 ` Christophe Fergeau
@ 2011-05-27 10:34 ` Amit Shah
  2011-05-30 10:28   ` [Qemu-devel] [PATCH 0/2] Fix unused-but-set-variable warnings Christophe Fergeau
  1 sibling, 1 reply; 23+ messages in thread
From: Amit Shah @ 2011-05-27 10:34 UTC (permalink / raw)
  To: Hans de Goede; +Cc: qemu-devel

On (Tue) 03 May 2011 [13:03:40], Hans de Goede wrote:
> ---
>  target-i386/kvm.c |    4 ++--
>  tcg/tcg.c         |    4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)

Thanks; just got hit by this.

However, there are a couple of whitespace issues:

> --- a/tcg/tcg.c
> +++ b/tcg/tcg.c
> @@ -585,7 +585,7 @@ void tcg_register_helper(void *func, const char *name)
>  void tcg_gen_callN(TCGContext *s, TCGv_ptr func, unsigned int flags,
>                     int sizemask, TCGArg ret, int nargs, TCGArg *args)
>  {
> -#ifdef TCG_TARGET_I386
> +#if defined TCG_TARGET_I386 && TCG_TARGET_REG_BITS < 64 
>      int call_type;
>  #endif
>      int i;
> @@ -612,7 +612,7 @@ void tcg_gen_callN(TCGContext *s, TCGv_ptr func, unsigned int flags,
>  
>      *gen_opc_ptr++ = INDEX_op_call;
>      nparam = gen_opparam_ptr++;
> -#ifdef TCG_TARGET_I386
> +#if defined TCG_TARGET_I386 && TCG_TARGET_REG_BITS < 64 
>      call_type = (flags & TCG_CALL_TYPE_MASK);
>  #endif
>      if (ret != TCG_CALL_DUMMY_ARG) {

Both these lines have a trailing space.

Care to resubmit with Anthony in CC?  You can add:

Acked-by: Amit Shah <amit.shah@redhat.com>

		Amit

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Qemu-devel] [PATCH 0/2] Fix unused-but-set-variable warnings
  2011-05-27 10:34 ` Amit Shah
@ 2011-05-30 10:28   ` Christophe Fergeau
  2011-05-30 10:28     ` [Qemu-devel] [PATCH 1/2] tcg: Fix unused-but-set-variable warning Christophe Fergeau
                       ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Christophe Fergeau @ 2011-05-30 10:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: Amit Shah, Hans de Goede, Christophe Fergeau, Aurelien Jarno

Hi,

Here are Hans's patches split and with the various issues that were pointed
out fixed. I'm not sure how I'm supposed to handle acks, original author,
... when reworking patches this way, let me know if I should proceed
differently.

Christophe


Christophe Fergeau (2):
  tcg: Fix unused-but-set-variable warning
  kvm: Fix unused-but-set-variable warning

 target-i386/kvm.c |    3 +--
 tcg/tcg.c         |    4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

-- 
1.7.5.2

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Qemu-devel] [PATCH 1/2] tcg: Fix unused-but-set-variable warning
  2011-05-30 10:28   ` [Qemu-devel] [PATCH 0/2] Fix unused-but-set-variable warnings Christophe Fergeau
@ 2011-05-30 10:28     ` Christophe Fergeau
  2011-05-30 10:28     ` [Qemu-devel] [PATCH 2/2] kvm: " Christophe Fergeau
  2011-05-30 10:53     ` [Qemu-devel] [PATCH 0/2] Fix unused-but-set-variable warnings Amit Shah
  2 siblings, 0 replies; 23+ messages in thread
From: Christophe Fergeau @ 2011-05-30 10:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: Amit Shah, Hans de Goede, Christophe Fergeau, Aurelien Jarno

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>
---
 tcg/tcg.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tcg/tcg.c b/tcg/tcg.c
index 8748c05..e53b54c 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -585,7 +585,7 @@ void tcg_register_helper(void *func, const char *name)
 void tcg_gen_callN(TCGContext *s, TCGv_ptr func, unsigned int flags,
                    int sizemask, TCGArg ret, int nargs, TCGArg *args)
 {
-#ifdef TCG_TARGET_I386
+#if defined(TCG_TARGET_I386) && TCG_TARGET_REG_BITS < 64
     int call_type;
 #endif
     int i;
@@ -612,7 +612,7 @@ void tcg_gen_callN(TCGContext *s, TCGv_ptr func, unsigned int flags,
 
     *gen_opc_ptr++ = INDEX_op_call;
     nparam = gen_opparam_ptr++;
-#ifdef TCG_TARGET_I386
+#if defined(TCG_TARGET_I386) && TCG_TARGET_REG_BITS < 64
     call_type = (flags & TCG_CALL_TYPE_MASK);
 #endif
     if (ret != TCG_CALL_DUMMY_ARG) {
-- 
1.7.5.2

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Qemu-devel] [PATCH 2/2] kvm: Fix unused-but-set-variable warning
  2011-05-30 10:28   ` [Qemu-devel] [PATCH 0/2] Fix unused-but-set-variable warnings Christophe Fergeau
  2011-05-30 10:28     ` [Qemu-devel] [PATCH 1/2] tcg: Fix unused-but-set-variable warning Christophe Fergeau
@ 2011-05-30 10:28     ` Christophe Fergeau
  2011-05-30 10:53     ` [Qemu-devel] [PATCH 0/2] Fix unused-but-set-variable warnings Amit Shah
  2 siblings, 0 replies; 23+ messages in thread
From: Christophe Fergeau @ 2011-05-30 10:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: Amit Shah, Hans de Goede, Christophe Fergeau, Aurelien Jarno

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>
---
 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

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [Qemu-devel] [PATCH 0/2] Fix unused-but-set-variable warnings
  2011-05-30 10:28   ` [Qemu-devel] [PATCH 0/2] Fix unused-but-set-variable warnings Christophe Fergeau
  2011-05-30 10:28     ` [Qemu-devel] [PATCH 1/2] tcg: Fix unused-but-set-variable warning Christophe Fergeau
  2011-05-30 10:28     ` [Qemu-devel] [PATCH 2/2] kvm: " Christophe Fergeau
@ 2011-05-30 10:53     ` Amit Shah
  2011-05-30 13:56       ` Christophe Fergeau
  2 siblings, 1 reply; 23+ messages in thread
From: Amit Shah @ 2011-05-30 10:53 UTC (permalink / raw)
  To: Christophe Fergeau; +Cc: Hans de Goede, qemu-devel, Aurelien Jarno

On (Mon) 30 May 2011 [12:28:01], Christophe Fergeau wrote:
> Hi,
> 
> Here are Hans's patches split and with the various issues that were pointed
> out fixed. I'm not sure how I'm supposed to handle acks, original author,
> ... when reworking patches this way, let me know if I should proceed
> differently.

You should keep From: as the same person, keep his Signed-off-by, add
your Signed-off-by and mention what you have changed in the series.

Thanks for re-sending this, btw.

		Amit

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Qemu-devel] [PATCH 0/2] Fix unused-but-set-variable warnings
  2011-05-30 10:53     ` [Qemu-devel] [PATCH 0/2] Fix unused-but-set-variable warnings Amit Shah
@ 2011-05-30 13:56       ` Christophe Fergeau
  2011-05-31  5:43         ` Amit Shah
  0 siblings, 1 reply; 23+ messages in thread
From: Christophe Fergeau @ 2011-05-30 13:56 UTC (permalink / raw)
  To: Amit Shah; +Cc: Hans de Goede, qemu-devel, Aurelien Jarno

[-- Attachment #1: Type: text/plain, Size: 494 bytes --]

On Mon, May 30, 2011 at 04:23:43PM +0530, Amit Shah wrote:
> You should keep From: as the same person, keep his Signed-off-by, add
> your Signed-off-by and mention what you have changed in the series.

Hans's patches didn't have a S-o-b. I can resend the same patches again
with my S-o-b (I'm fine with doing this without Hans's since I came up with
exactly the same patches independently from Hans) and detailing the changes
from the initial patch. Does that sound good?

Christophe

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Qemu-devel] [PATCH 0/2] Fix unused-but-set-variable warnings
  2011-05-30 13:56       ` Christophe Fergeau
@ 2011-05-31  5:43         ` Amit Shah
  2011-05-31  7:53           ` [Qemu-devel] [PATCH-v3 " Christophe Fergeau
  0 siblings, 1 reply; 23+ messages in thread
From: Amit Shah @ 2011-05-31  5:43 UTC (permalink / raw)
  To: Christophe Fergeau; +Cc: Hans de Goede, qemu-devel, Aurelien Jarno

On (Mon) 30 May 2011 [15:56:28], Christophe Fergeau wrote:
> On Mon, May 30, 2011 at 04:23:43PM +0530, Amit Shah wrote:
> > You should keep From: as the same person, keep his Signed-off-by, add
> > your Signed-off-by and mention what you have changed in the series.
> 
> Hans's patches didn't have a S-o-b. I can resend the same patches again
> with my S-o-b (I'm fine with doing this without Hans's since I came up with
> exactly the same patches independently from Hans) and detailing the changes
> from the initial patch. Does that sound good?

Yes, that's fine.

		Amit

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Qemu-devel] [PATCH-v3 0/2] Fix unused-but-set-variable warnings
  2011-05-31  5:43         ` Amit Shah
@ 2011-05-31  7:53           ` Christophe Fergeau
  2011-05-31  7:53             ` [Qemu-devel] [PATCH-v3 1/2] tcg: Fix unused-but-set-variable warning Christophe Fergeau
  2011-05-31  7:53             ` [Qemu-devel] [PATCH-v3 2/2] kvm: " Christophe Fergeau
  0 siblings, 2 replies; 23+ messages in thread
From: Christophe Fergeau @ 2011-05-31  7:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: Amit Shah, Hans de Goede, Aurelien Jarno

Here is another version of these patches.

Christophe

Changes:
v3
 - added S-o-b

v2
 - split patches
 - removed whitespace at end of lines in tcm.
 - changed #if defined XXX to #if defined(XXX)
 - removed commented out line from kvm.c in the 1st patch

v1
 - initial version from Hans

Christophe Fergeau (2):
  tcg: Fix unused-but-set-variable warning
  kvm: Fix unused-but-set-variable warning

 target-i386/kvm.c |    3 +--
 tcg/tcg.c         |    4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

-- 
1.7.5.2

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Qemu-devel] [PATCH-v3 1/2] tcg: Fix unused-but-set-variable warning
  2011-05-31  7:53           ` [Qemu-devel] [PATCH-v3 " Christophe Fergeau
@ 2011-05-31  7:53             ` Christophe Fergeau
  2011-06-03 16:35               ` Aurelien Jarno
  2011-05-31  7:53             ` [Qemu-devel] [PATCH-v3 2/2] kvm: " Christophe Fergeau
  1 sibling, 1 reply; 23+ messages in thread
From: Christophe Fergeau @ 2011-05-31  7:53 UTC (permalink / raw)
  To: qemu-devel

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>
---
 tcg/tcg.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tcg/tcg.c b/tcg/tcg.c
index 8748c05..e53b54c 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -585,7 +585,7 @@ void tcg_register_helper(void *func, const char *name)
 void tcg_gen_callN(TCGContext *s, TCGv_ptr func, unsigned int flags,
                    int sizemask, TCGArg ret, int nargs, TCGArg *args)
 {
-#ifdef TCG_TARGET_I386
+#if defined(TCG_TARGET_I386) && TCG_TARGET_REG_BITS < 64
     int call_type;
 #endif
     int i;
@@ -612,7 +612,7 @@ void tcg_gen_callN(TCGContext *s, TCGv_ptr func, unsigned int flags,
 
     *gen_opc_ptr++ = INDEX_op_call;
     nparam = gen_opparam_ptr++;
-#ifdef TCG_TARGET_I386
+#if defined(TCG_TARGET_I386) && TCG_TARGET_REG_BITS < 64
     call_type = (flags & TCG_CALL_TYPE_MASK);
 #endif
     if (ret != TCG_CALL_DUMMY_ARG) {
-- 
1.7.5.2

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Qemu-devel] [PATCH-v3 2/2] kvm: Fix unused-but-set-variable warning
  2011-05-31  7:53           ` [Qemu-devel] [PATCH-v3 " Christophe Fergeau
  2011-05-31  7:53             ` [Qemu-devel] [PATCH-v3 1/2] tcg: Fix unused-but-set-variable warning Christophe Fergeau
@ 2011-05-31  7:53             ` Christophe Fergeau
  2011-06-10 10:43               ` Christophe Fergeau
  2011-06-10 18:46               ` Stefan Hajnoczi
  1 sibling, 2 replies; 23+ messages in thread
From: Christophe Fergeau @ 2011-05-31  7:53 UTC (permalink / raw)
  To: qemu-devel

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

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [Qemu-devel] [PATCH-v3 1/2] tcg: Fix unused-but-set-variable warning
  2011-05-31  7:53             ` [Qemu-devel] [PATCH-v3 1/2] tcg: Fix unused-but-set-variable warning Christophe Fergeau
@ 2011-06-03 16:35               ` Aurelien Jarno
  0 siblings, 0 replies; 23+ messages in thread
From: Aurelien Jarno @ 2011-06-03 16:35 UTC (permalink / raw)
  To: Christophe Fergeau; +Cc: qemu-devel

On Tue, May 31, 2011 at 09:53:48AM +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>
> ---
>  tcg/tcg.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

Thanks, applied.

> diff --git a/tcg/tcg.c b/tcg/tcg.c
> index 8748c05..e53b54c 100644
> --- a/tcg/tcg.c
> +++ b/tcg/tcg.c
> @@ -585,7 +585,7 @@ void tcg_register_helper(void *func, const char *name)
>  void tcg_gen_callN(TCGContext *s, TCGv_ptr func, unsigned int flags,
>                     int sizemask, TCGArg ret, int nargs, TCGArg *args)
>  {
> -#ifdef TCG_TARGET_I386
> +#if defined(TCG_TARGET_I386) && TCG_TARGET_REG_BITS < 64
>      int call_type;
>  #endif
>      int i;
> @@ -612,7 +612,7 @@ void tcg_gen_callN(TCGContext *s, TCGv_ptr func, unsigned int flags,
>  
>      *gen_opc_ptr++ = INDEX_op_call;
>      nparam = gen_opparam_ptr++;
> -#ifdef TCG_TARGET_I386
> +#if defined(TCG_TARGET_I386) && TCG_TARGET_REG_BITS < 64
>      call_type = (flags & TCG_CALL_TYPE_MASK);
>  #endif
>      if (ret != TCG_CALL_DUMMY_ARG) {
> -- 
> 1.7.5.2
> 
> 
> 

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Qemu-devel] [PATCH-v3 2/2] kvm: Fix unused-but-set-variable warning
  2011-05-31  7:53             ` [Qemu-devel] [PATCH-v3 2/2] kvm: " Christophe Fergeau
@ 2011-06-10 10:43               ` Christophe Fergeau
  2011-06-10 12:17                 ` Stefan Hajnoczi
  2011-06-10 18:46               ` Stefan Hajnoczi
  1 sibling, 1 reply; 23+ messages in thread
From: Christophe Fergeau @ 2011-06-10 10:43 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]

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
> 
> 

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Qemu-devel] [PATCH-v3 2/2] kvm: Fix unused-but-set-variable warning
  2011-06-10 10:43               ` Christophe Fergeau
@ 2011-06-10 12:17                 ` Stefan Hajnoczi
  0 siblings, 0 replies; 23+ messages in thread
From: Stefan Hajnoczi @ 2011-06-10 12:17 UTC (permalink / raw)
  To: Christophe Fergeau; +Cc: qemu-trivial, Peter Maydell, qemu-devel, Kevin Wolf

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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Qemu-devel] [PATCH-v3 2/2] kvm: Fix unused-but-set-variable warning
  2011-05-31  7:53             ` [Qemu-devel] [PATCH-v3 2/2] kvm: " Christophe Fergeau
  2011-06-10 10:43               ` Christophe Fergeau
@ 2011-06-10 18:46               ` Stefan Hajnoczi
  2011-06-11  7:46                 ` Jan Kiszka
  1 sibling, 1 reply; 23+ messages in thread
From: Stefan Hajnoczi @ 2011-06-10 18:46 UTC (permalink / raw)
  To: Christophe Fergeau; +Cc: qemu-devel

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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Qemu-devel] [PATCH-v3 2/2] kvm: Fix unused-but-set-variable warning
  2011-06-10 18:46               ` Stefan Hajnoczi
@ 2011-06-11  7:46                 ` Jan Kiszka
  2011-06-11 13:06                   ` Stefan Hajnoczi
  0 siblings, 1 reply; 23+ messages in thread
From: Jan Kiszka @ 2011-06-11  7:46 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-devel, Christophe Fergeau

[-- Attachment #1: Type: text/plain, Size: 696 bytes --]

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Qemu-devel] [PATCH-v3 2/2] kvm: Fix unused-but-set-variable warning
  2011-06-11  7:46                 ` Jan Kiszka
@ 2011-06-11 13:06                   ` Stefan Hajnoczi
  2011-06-14 19:50                     ` Christophe Fergeau
  0 siblings, 1 reply; 23+ messages in thread
From: Stefan Hajnoczi @ 2011-06-11 13:06 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-devel, Christophe Fergeau

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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Qemu-devel] [PATCH-v3 2/2] kvm: Fix unused-but-set-variable warning
  2011-06-11 13:06                   ` Stefan Hajnoczi
@ 2011-06-14 19:50                     ` Christophe Fergeau
  0 siblings, 0 replies; 23+ messages in thread
From: Christophe Fergeau @ 2011-06-14 19:50 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: Jan Kiszka, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 397 bytes --]

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

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix a number of unused-but-set-variable warnings (new with gcc-4.6)
  2011-06-08  9:22 ` Kevin Wolf
@ 2011-06-08 11:22   ` Christophe Fergeau
  0 siblings, 0 replies; 23+ messages in thread
From: Christophe Fergeau @ 2011-06-08 11:22 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: Hans de Goede, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 500 bytes --]

On Wed, Jun 08, 2011 at 11:22:06AM +0200, Kevin Wolf wrote:
> Am 08.06.2011 10:28, schrieb Hans de Goede:
> > ---
> >  hw/lsi53c895a.c   |    2 --
> >  target-i386/kvm.c |    4 ++--
> >  2 files changed, 2 insertions(+), 4 deletions(-)
> 
> SoB is missing. And don't we have multiple patches to fix the same thing
> already? Someone should just merge them...

Yes these fixes have already been submitted several times, it would indeed
be good to finally have them merged ;)

Christophe

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix a number of unused-but-set-variable warnings (new with gcc-4.6)
  2011-06-08  8:28 [Qemu-devel] [PATCH] Fix a number of unused-but-set-variable warnings (new with gcc-4.6) Hans de Goede
@ 2011-06-08  9:22 ` Kevin Wolf
  2011-06-08 11:22   ` Christophe Fergeau
  0 siblings, 1 reply; 23+ messages in thread
From: Kevin Wolf @ 2011-06-08  9:22 UTC (permalink / raw)
  To: Hans de Goede; +Cc: qemu-devel

Am 08.06.2011 10:28, schrieb Hans de Goede:
> ---
>  hw/lsi53c895a.c   |    2 --
>  target-i386/kvm.c |    4 ++--
>  2 files changed, 2 insertions(+), 4 deletions(-)

SoB is missing. And don't we have multiple patches to fix the same thing
already? Someone should just merge them...

Kevin

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Qemu-devel] [PATCH] Fix a number of unused-but-set-variable warnings (new with gcc-4.6)
@ 2011-06-08  8:28 Hans de Goede
  2011-06-08  9:22 ` Kevin Wolf
  0 siblings, 1 reply; 23+ messages in thread
From: Hans de Goede @ 2011-06-08  8:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: Hans de Goede

---
 hw/lsi53c895a.c   |    2 --
 target-i386/kvm.c |    4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c
index 83084b6..90c6cbc 100644
--- a/hw/lsi53c895a.c
+++ b/hw/lsi53c895a.c
@@ -889,7 +889,6 @@ static void lsi_do_msgout(LSIState *s)
     uint8_t msg;
     int len;
     uint32_t current_tag;
-    SCSIDevice *current_dev;
     lsi_request *current_req, *p, *p_next;
     int id;
 
@@ -901,7 +900,6 @@ static void lsi_do_msgout(LSIState *s)
         current_req = lsi_find_by_tag(s, current_tag);
     }
     id = (current_tag >> 8) & 0xf;
-    current_dev = s->bus.devs[id];
 
     DPRINTF("MSG out len=%d\n", s->dbc);
     while (s->dbc) {
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index faedc6c..6f003b0 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,7 @@ 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);
+    /* fop = (uint16_t)(xsave->region[1] >> 16); */
     env->fpstt = (swd >> 11) & 7;
     env->fpus = swd;
     env->fpuc = cwd;
-- 
1.7.5.1

^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2011-06-14 19:51 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-03 11:03 [Qemu-devel] [PATCH] Fix a number of unused-but-set-variable warnings (new with gcc-4.6) Hans de Goede
2011-05-17 11:25 ` Christophe Fergeau
2011-05-17 17:51   ` Aurelien Jarno
2011-05-27 10:34 ` Amit Shah
2011-05-30 10:28   ` [Qemu-devel] [PATCH 0/2] Fix unused-but-set-variable warnings Christophe Fergeau
2011-05-30 10:28     ` [Qemu-devel] [PATCH 1/2] tcg: Fix unused-but-set-variable warning Christophe Fergeau
2011-05-30 10:28     ` [Qemu-devel] [PATCH 2/2] kvm: " Christophe Fergeau
2011-05-30 10:53     ` [Qemu-devel] [PATCH 0/2] Fix unused-but-set-variable warnings Amit Shah
2011-05-30 13:56       ` Christophe Fergeau
2011-05-31  5:43         ` Amit Shah
2011-05-31  7:53           ` [Qemu-devel] [PATCH-v3 " Christophe Fergeau
2011-05-31  7:53             ` [Qemu-devel] [PATCH-v3 1/2] tcg: Fix unused-but-set-variable warning Christophe Fergeau
2011-06-03 16:35               ` Aurelien Jarno
2011-05-31  7:53             ` [Qemu-devel] [PATCH-v3 2/2] kvm: " Christophe Fergeau
2011-06-10 10:43               ` Christophe Fergeau
2011-06-10 12:17                 ` Stefan Hajnoczi
2011-06-10 18:46               ` Stefan Hajnoczi
2011-06-11  7:46                 ` Jan Kiszka
2011-06-11 13:06                   ` Stefan Hajnoczi
2011-06-14 19:50                     ` Christophe Fergeau
2011-06-08  8:28 [Qemu-devel] [PATCH] Fix a number of unused-but-set-variable warnings (new with gcc-4.6) Hans de Goede
2011-06-08  9:22 ` Kevin Wolf
2011-06-08 11:22   ` Christophe Fergeau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.