From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5fEr-0004AN-BZ for qemu-devel@nongnu.org; Thu, 08 Mar 2012 10:26:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S5fEm-0007it-BE for qemu-devel@nongnu.org; Thu, 08 Mar 2012 10:26:44 -0500 MIME-Version: 1.0 In-Reply-To: <1330176948-14379-1-git-send-email-sw@weilnetz.de> References: <1330176948-14379-1-git-send-email-sw@weilnetz.de> Date: Thu, 8 Mar 2012 15:26:36 +0000 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] vnc: Fix packed boolean struct members List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: QEMU Trivial , Anthony Liguori , qemu-devel@nongnu.org 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 packing and changed the data type to bool > because both are used as boolean values. > > Cc: Anthony Liguori > Signed-off-by: Stefan Weil > --- > =A0ui/vnc-auth-sasl.h | =A0 =A04 ++-- > =A01 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/ui/vnc-auth-sasl.h b/ui/vnc-auth-sasl.h > index fd9b18a..ee243a9 100644 > --- a/ui/vnc-auth-sasl.h > +++ b/ui/vnc-auth-sasl.h > @@ -37,9 +37,9 @@ typedef struct VncDisplaySASL VncDisplaySASL; > =A0struct VncStateSASL { > =A0 =A0 sasl_conn_t *conn; > =A0 =A0 /* If we want to negotiate an SSF layer with client */ > - =A0 =A0int wantSSF :1; > + =A0 =A0bool wantSSF; > =A0 =A0 /* If we are now running the SSF layer */ > - =A0 =A0int runSSF :1; > + =A0 =A0bool runSSF; 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/Linaro 4.5.2-8ubuntu4: CC ui/vnc-auth-sasl.o cc1: warnings being treated as errors /home/anthony/git/qemu/ui/vnc-auth-sasl.c: In function =91vnc_sasl_client_cleanup=92: /home/anthony/git/qemu/ui/vnc-auth-sasl.c:34:9: error: suggest parentheses around assignment used as truth value make: *** [ui/vnc-auth-sasl.o] Error 1