Re: [Qemu-devel] [PATCH] vnc: Fix packed boolean struct members

2012-03-08 Thread Paolo Bonzini
Il 08/03/2012 17:25, Anthony Liguori ha scritto: >> >> Looks like a GCC bug where >> >> x = y = 0; >> >> is converted to >> >> x = (y = 0) != 0; > > Curious, why convert like this? What does this optimization do? Nothing, it's just that if "y = 0" is an int (for some reason, I didn't che

Re: [Qemu-devel] [PATCH] vnc: Fix packed boolean struct members

2012-03-08 Thread Anthony Liguori
On 03/08/2012 10:08 AM, Paolo Bonzini wrote: Il 08/03/2012 16:26, Stefan Hajnoczi ha scritto: I had to drop this patch from the trivial patches tree, it tickles a new gcc warning. Please resend with the necessary change. I cannot reproduce it on my build host here with gcc Debian 4.6.2-12 but

Re: [Qemu-devel] [PATCH] vnc: Fix packed boolean struct members

2012-03-08 Thread Paolo Bonzini
Il 08/03/2012 16:26, Stefan Hajnoczi ha scritto: > I had to drop this patch from the trivial patches tree, it tickles a > new gcc warning. Please resend with the necessary change. > > I cannot reproduce it on my build host here with gcc Debian 4.6.2-12 > but Anthony reports the following Ubuntu/L

Re: [Qemu-devel] [PATCH] vnc: Fix packed boolean struct members

2012-03-08 Thread Stefan Hajnoczi
On Sat, Feb 25, 2012 at 1:35 PM, Stefan Weil wrote: > This patch fixes warnings reported by splint: > > For variables which are packed in a single bit, a signed data type > like 'int' does not make much sense. > > There is no obvious reason why the two values should be packed, > so I removed the p

Re: [Qemu-devel] [PATCH] vnc: Fix packed boolean struct members

2012-03-05 Thread Stefan Hajnoczi
On Sat, Feb 25, 2012 at 02:35:47PM +0100, Stefan Weil wrote: > This patch fixes warnings reported by splint: > > For variables which are packed in a single bit, a signed data type > like 'int' does not make much sense. > > There is no obvious reason why the two values should be packed, > so I rem

[Qemu-devel] [PATCH] vnc: Fix packed boolean struct members

2012-02-25 Thread Stefan Weil
This patch fixes warnings reported by splint: For variables which are packed in a single bit, a signed data type like 'int' does not make much sense. There is no obvious reason why the two values should be packed, so I removed the packing and changed the data type to bool because both are used as