Received: from eggs.gnu.org ([208.118.235.92]:59478) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S86Zh-0000JQ-Rx for qemu-devel@nongnu.org; Thu, 15 Mar 2012 05:02:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S86ZJ-00054e-2s for qemu-devel@nongnu.org; Thu, 15 Mar 2012 05:02:21 -0400 Date: Thu, 15 Mar 2012 08:28:20 +0000 From: Stefan Hajnoczi Message-ID: <20120315082820.GD14640@stefanha-thinkpad.localdomain> References: <1331243886-19117-1-git-send-email-sw@weilnetz.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1331243886-19117-1-git-send-email-sw@weilnetz.de> Subject: Re: [Qemu-devel] [PATCH v2] 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 Thu, Mar 08, 2012 at 10:58:06PM +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 removed the packing and changed the data type to bool > because both are used as boolean values. > > v2: > > Some versions of gcc complain after this modification, > for example gcc (Debian 4.4.5-8) 4.4.5): > > ui/vnc-auth-sasl.c: In function ‘vnc_sasl_client_cleanup’: > ui/vnc-auth-sasl.c:34: error: suggest parentheses around assignment used as truth value > > Obviously, the compiler does not like code which does > bool = unsigned = bool = 0 > > Splitting that code in three statements works. > > Cc: Anthony Liguori > Signed-off-by: Stefan Weil > --- > ui/vnc-auth-sasl.c | 4 +++- > ui/vnc-auth-sasl.h | 4 ++-- > 2 files changed, 5 insertions(+), 3 deletions(-) Thanks, applied to the trivial patches tree: https://github.com/stefanha/qemu/commits/trivial-patches Stefan