From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38399) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5ftY-0004yY-Ai for qemu-devel@nongnu.org; Thu, 08 Mar 2012 11:08:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S5ftO-0007vv-JG for qemu-devel@nongnu.org; Thu, 08 Mar 2012 11:08:47 -0500 Sender: Paolo Bonzini Message-ID: <4F58D961.70706@redhat.com> Date: Thu, 08 Mar 2012 17:08:01 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1330176948-14379-1-git-send-email-sw@weilnetz.de> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit 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 Hajnoczi Cc: QEMU Trivial , Stefan Weil , Anthony Liguori , qemu-devel@nongnu.org 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/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 > ‘vnc_sasl_client_cleanup’: > /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 Looks like a GCC bug where x = y = 0; is converted to x = (y = 0) != 0; and the magic that does this inside the compiler causes the warning. We should add a configure check to only add -Werror on compilers newer than X (for example X could leave out GCC 4.5), so that this patch can be reapplied. Paolo