From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=53738 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OxkiS-00072d-FA for qemu-devel@nongnu.org; Mon, 20 Sep 2010 14:03:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OxkiR-0004wi-CO for qemu-devel@nongnu.org; Mon, 20 Sep 2010 14:03:48 -0400 Received: from mail-qw0-f45.google.com ([209.85.216.45]:38990) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OxkiR-0004wb-7U for qemu-devel@nongnu.org; Mon, 20 Sep 2010 14:03:47 -0400 Received: by qwk4 with SMTP id 4so4004415qwk.4 for ; Mon, 20 Sep 2010 11:03:46 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4C972B3A.7000800@redhat.com> References: <4C972B3A.7000800@redhat.com> From: Blue Swirl Date: Mon, 20 Sep 2010 18:03:26 +0000 Message-ID: Subject: Re: [Qemu-devel] [PATCH] Fix vhost_net compilation errors for i386-softmmu target Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michal Novotny Cc: "qemu-devel@nongnu.org" On Mon, Sep 20, 2010 at 9:36 AM, Michal Novotny wrote= : > Hi, > there were compilation errors when I was trying to compile i386-softmmu > target on i386 > host (running on Fedora-13 with development version of qemu downloaded fr= om > git). > > There were errors of comparison of unsigned expression was always true wh= ich > made it > unable to compile. This simple fix fixes the issue. > > ... > cc1: warnings being treated as errors > .../hw/vhost_net.c: In function =E2=80=98vhost_net_start=E2=80=99: > .../vhost_net.c:154: error: comparison of unsigned expression >=3D 0 is a= lways > true > make[1]: *** [vhost_net.o] Error 1 > make: *** [subdir-i386-softmmu] Error 2 > > Signed-off-by: Michal Novotny I don't think the patch is correct. It looks like zero is a valid value for file.index, changing the check means that the ioctl is not performed for case file.index =3D=3D 0. The preincrements and predecrements seem suspicious.