From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLGYw-0003tb-I3 for qemu-devel@nongnu.org; Tue, 10 Feb 2015 14:33:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLGYv-0000yu-7r for qemu-devel@nongnu.org; Tue, 10 Feb 2015 14:33:34 -0500 Date: Tue, 10 Feb 2015 19:33:22 +0000 From: "Richard W.M. Jones" Message-ID: <20150210193322.GN11603@redhat.com> References: <1422618777-8832-1-git-send-email-rjones@redhat.com> <54DA58D7.8080400@msgid.tls.msk.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <54DA58D7.8080400@msgid.tls.msk.ru> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] Fix comparisons between implicit booleans and integers. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev Cc: qemu-trivial@nongnu.org, lersek@redhat.com, qemu-devel@nongnu.org, dgilbert@redhat.com On Tue, Feb 10, 2015 at 10:15:35PM +0300, Michael Tokarev wrote: > 30.01.2015 14:52, Richard W.M. Jones wrote: > > In GCC 5 there is a new warning (-Wlogical-not-parentheses) which > > prevents you from writing: > >=20 > > if ( =3D=3D ) ... > >=20 > > A typical error would be: > >=20 > > kvm-all.c: In function =E2=80=98kvm_set_migration_log=E2=80=99: > > kvm-all.c:383:54: error: logical not is only applied to the left hand= side of comparison [-Werror=3Dlogical-not-parentheses] > > if (!!(mem->flags & KVM_MEM_LOG_DIRTY_PAGES) =3D=3D enable) = { > >=20 > > Fix a few places where the build is now broken in GCC 5. > >=20 > > The warning isn't even consistent, as with the place in > > hw/net/virtio-net.c where I had to cast an obviously boolean > > expression to bool. >=20 > Richard, I'd like to apply hunks 2 and 3, but leave out hunk 1 > for now. As a start, the hunk 1 looks a bit, well, ugly, don't > you think? But if I just drop hunk 1, the commit message will > be a bit misleading, since it describes exactly the hunk1 change... Please feel free to apply and bits and modify the commit message as you wish. I just want qemu to be fixed on gcc 5, I don't care how we get there :-) Rich. --=20 Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rj= ones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html