[Qemu-devel] [PATCHv2 0/4] libcacard fixes

2011-06-27 Thread Christophe Fergeau
Hey, Alon asked me to split the parsing patches to make the review easier, to here they are. Changes since v1: - split first patch into 3 patches, v1 2/2 is unchanged Christophe Fergeau (4): libcacard: s/strip(args++)/strip(args+1) libcacard: fix soft=... parsing in vcard_emul_options

[Qemu-devel] [PATCHv2 1/4] libcacard: s/strip(args++)/strip(args+1)

2011-06-27 Thread Christophe Fergeau
will do what we expect. Signed-off-by: Christophe Fergeau cferg...@redhat.com --- libcacard/vcard_emul_nss.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libcacard/vcard_emul_nss.c b/libcacard/vcard_emul_nss.c index f3db657..184252f 100644 --- a/libcacard

[Qemu-devel] [PATCHv2 3/4] libcacard: introduce NEXT_TOKEN macro

2011-06-27 Thread Christophe Fergeau
vcard_emul_options now has repetitive code to read the current token and advance to the next. After the previous changes, this repetitive code can be moved in a NEXT_TOKEN macro to avoid having this code duplicated. Signed-off-by: Christophe Fergeau cferg...@redhat.com --- libcacard

[Qemu-devel] [PATCH 2/2] libcacard: replace copy_string with strndup

2011-06-24 Thread Christophe Fergeau
copy_string reimplements strndup, this commit removes it and replaces all copy_string uses with strndup. Signed-off-by: Christophe Fergeau cferg...@redhat.com --- libcacard/vcard_emul_nss.c | 23 ++- 1 files changed, 6 insertions(+), 17 deletions(-) diff --git a/libcacard

[Qemu-devel] [PATCH 1/2] libcacard: fix soft=... parsing in vcard_emul_options

2011-06-24 Thread Christophe Fergeau
. valgrind rightfully complained about this. It also didn't handle empty fields correctly, and there were some args = strip(args++); which also didn't do what was expected. Since the token parsing is always the same, I factored all the repetitive code in a NEXT_TOKEN macro. Signed-off-by: Christophe

Re: [Qemu-devel] [PATCH][uq/master] kvm: x86: Save/restore FPU OP, IP and DP

2011-06-16 Thread Christophe Fergeau
Hi Jan, On Sat, Jun 11, 2011 at 11:23:31AM +0200, Jan Kiszka wrote: These FPU states are properly maintained by KVM but not yet by TCG. So far we unconditionally set them to 0 in the guest which may cause state corruptions - not only during migration. I can't judge whether the patch is

Re: [Qemu-devel] [PATCH v2][uq/master] kvm: x86: Save/restore FPU OP, IP and DP

2011-06-16 Thread Christophe Fergeau
On Wed, Jun 15, 2011 at 03:17:26PM +0200, Jan Kiszka wrote: These FPU states are properly maintained by KVM but not yet by TCG. So far we unconditionally set them to 0 in the guest which may cause state corruptions, though not with modern guests. And this one's fine too from a compilation

Re: [Qemu-devel] [PATCH-v3 2/2] kvm: Fix unused-but-set-variable warning

2011-06-14 Thread Christophe Fergeau
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.kis...@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

Re: [Qemu-devel] [PATCH-v3 2/2] kvm: Fix unused-but-set-variable warning

2011-06-10 Thread Christophe Fergeau
Ping? On Tue, May 31, 2011 at 09:53:49AM +0200, Christophe Fergeau wrote: Based on a patch from Hans de Goede hdego...@redhat.com This warning is new in gcc 4.6. Acked-by: Amit Shah amit.s...@redhat.com Signed-off-by: Christophe Fergeau cferg...@redhat.com --- target-i386/kvm.c |3

Re: [Qemu-devel] [PATCH] Fix a number of unused-but-set-variable warnings (new with gcc-4.6)

2011-06-08 Thread Christophe Fergeau
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

[Qemu-devel] [Bug 793317] Re: Large amount of write-only variables

2011-06-06 Thread Christophe Fergeau
Patches were already sent to the ML, see the [PATCH 00/14] More gcc 4.6 warnings fixes and [PATCH 0/3] Fix unused-but-set-variable warnings threads -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

Re: [Qemu-devel] [PATCH 00/14] More gcc 4.6 warnings fixes

2011-06-02 Thread Christophe Fergeau
Hi, On Thu, Jun 02, 2011 at 01:53:35PM +0200, Juan Quintela wrote: Juan Quintela (14): kvm: remove fop write only variable tcg: define and set call_type only when it is used These were already sent in this thread: http://thread.gmane.org/gmane.comp.emulators.qemu/101411 linuxload:

[Qemu-devel] [PATCH 1/3] lsi: Fix unused-but-set-variable warning

2011-06-01 Thread Christophe Fergeau
This warning is new in gcc 4.6. Signed-off-by: Christophe Fergeau cferg...@redhat.com --- hw/lsi53c895a.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c index 83084b6..90c6cbc 100644 --- a/hw/lsi53c895a.c +++ b/hw/lsi53c895a.c

[Qemu-devel] [PATCH 0/3] Fix unused-but-set-variable warnings

2011-06-01 Thread Christophe Fergeau
different values depending on some conditions, maybe it's not right to remove it but it should be used for something. Christophe Christophe Fergeau (3): lsi: Fix unused-but-set-variable warning ehci: Fix unused-but-set-variable warning linux-user: Fix unused-but-set-variable warning hw

[Qemu-devel] [PATCH 2/3] ehci: Fix unused-but-set-variable warning

2011-06-01 Thread Christophe Fergeau
This warning is new in gcc 4.6. Signed-off-by: Christophe Fergeau cferg...@redhat.com --- hw/usb-ehci.c | 11 +-- 1 files changed, 1 insertions(+), 10 deletions(-) diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c index f63519e..8a7b1bb 100644 --- a/hw/usb-ehci.c +++ b/hw/usb-ehci.c

[Qemu-devel] [PATCH 3/3] linux-user: Fix unused-but-set-variable warning

2011-06-01 Thread Christophe Fergeau
This warning is new in gcc 4.6. Signed-off-by: Christophe Fergeau cferg...@redhat.com --- linux-user/linuxload.c |9 + 1 files changed, 1 insertions(+), 8 deletions(-) diff --git a/linux-user/linuxload.c b/linux-user/linuxload.c index ac8c486..e66a4ea 100644 --- a/linux-user

Re: [Qemu-devel] [PATCH 2/3] ehci: Fix unused-but-set-variable warning

2011-06-01 Thread Christophe Fergeau
On Wed, Jun 01, 2011 at 09:53:46AM -0600, David Ahern wrote: I think you want those to be ehci-pid instead of deleting them. Yeah, this is exactly what I was wondering while making this patch, but couldn't decide which one was supposed to be given my total lack of knowledge of USB and of this

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

2011-05-31 Thread Christophe Fergeau
Based on a patch from Hans de Goede hdego...@redhat.com This warning is new in gcc 4.6. Acked-by: Amit Shah amit.s...@redhat.com Signed-off-by: Christophe Fergeau cferg...@redhat.com --- target-i386/kvm.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/target-i386

[Qemu-devel] [PATCH-v3 1/2] tcg: Fix unused-but-set-variable warning

2011-05-31 Thread Christophe Fergeau
Based on a patch from Hans de Goede hdego...@redhat.com This warning is new in gcc 4.6. Acked-by: Amit Shah amit.s...@redhat.com Signed-off-by: Christophe Fergeau cferg...@redhat.com --- tcg/tcg.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c

[Qemu-devel] [PATCH-v3 0/2] Fix unused-but-set-variable warnings

2011-05-31 Thread Christophe Fergeau
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

[Qemu-devel] [PATCH 0/2] Fix unused-but-set-variable warnings

2011-05-30 Thread Christophe Fergeau
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

[Qemu-devel] [PATCH 1/2] tcg: Fix unused-but-set-variable warning

2011-05-30 Thread Christophe Fergeau
Based on a patch from Hans de Goede hdego...@redhat.com This warning is new in gcc 4.6. Acked-by: Amit Shah amit.s...@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 +++

[Qemu-devel] [PATCH 2/2] kvm: Fix unused-but-set-variable warning

2011-05-30 Thread Christophe Fergeau
Based on a patch from Hans de Goede hdego...@redhat.com This warning is new in gcc 4.6. Acked-by: Amit Shah amit.s...@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

Re: [Qemu-devel] [PATCH 0/2] Fix unused-but-set-variable warnings

2011-05-30 Thread Christophe Fergeau
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

Re: [Qemu-devel] [PATCH] Fix a number of unused-but-set-variable warnings (new with gcc-4.6)

2011-05-17 Thread Christophe Fergeau
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

<    1   2