From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=59481 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OxkeG-0004VF-7O for qemu-devel@nongnu.org; Mon, 20 Sep 2010 13:59:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OxkeF-00041N-56 for qemu-devel@nongnu.org; Mon, 20 Sep 2010 13:59:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56868) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OxkeE-00041H-SO for qemu-devel@nongnu.org; Mon, 20 Sep 2010 13:59:27 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o8KHxP3q024654 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 20 Sep 2010 13:59:26 -0400 Date: Mon, 20 Sep 2010 19:53:28 +0200 From: "Michael S. Tsirkin" Message-ID: <20100920175328.GC30611@redhat.com> References: <4C972B3A.7000800@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4C972B3A.7000800@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [PATCH] Fix vhost_net compilation errors for i386-softmmu target 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 11:36:58AM +0200, 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 from git). >=20 > There were errors of comparison of unsigned expression was always > true which made it > unable to compile. This simple fix fixes the issue. >=20 > ... > 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 always true > make[1]: *** [vhost_net.o] Error 1 > make: *** [subdir-i386-softmmu] Error 2 >=20 > Signed-off-by: Michal Novotny >=20 > --=20 > Michal Novotny, RHCE > Virtualization Team (xen userspace), Red Hat >=20 This is not the right fix though. I have queued the correct one on my tree, will send pull request. > >From 21dd405dbc871c8d0053cc68f8862665dc12f69a Mon Sep 17 00:00:00 2001 > From: Michal Novotny > Date: Mon, 20 Sep 2010 11:29:42 +0200 > Subject: [PATCH] Fix vhost_net compilation errors for i386-softmmu targ= et > MIME-Version: 1.0 > Content-Type: text/plain; charset=3DUTF-8 > Content-Transfer-Encoding: 8bit >=20 > 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 = from git). >=20 > There were errors of comparison of unsigned expression was always true = which made it > unable to compile. This simple fix fixes the issue. >=20 > ... > cc1: warnings being treated as errors > .../hw/vhost_net.c: In function ???vhost_net_start???: > .../vhost_net.c:154: error: comparison of unsigned expression >=3D 0 is= always true > make[1]: *** [vhost_net.o] Error 1 > make: *** [subdir-i386-softmmu] Error 2 >=20 > Signed-off-by: Michal Novotny > --- > hw/vhost_net.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) >=20 > diff --git a/hw/vhost_net.c b/hw/vhost_net.c > index 4a7b819..6958712 100644 > --- a/hw/vhost_net.c > +++ b/hw/vhost_net.c > @@ -151,7 +151,7 @@ int vhost_net_start(struct vhost_net *net, > return 0; > fail: > file.fd =3D -1; > - while (--file.index >=3D 0) { > + while (--file.index > 0) { > int r =3D ioctl(net->dev.control, VHOST_NET_SET_BACKEND, &file= ); > assert(r >=3D 0); > } > --=20 > 1.7.2.3 >=20