From patchwork Mon Sep 20 09:36:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michal Novotny X-Patchwork-Id: 65188 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id EF7D0B70AB for ; Mon, 20 Sep 2010 19:39:48 +1000 (EST) Received: from localhost ([127.0.0.1]:52601 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oxcqf-0006vx-Oi for incoming@patchwork.ozlabs.org; Mon, 20 Sep 2010 05:39:45 -0400 Received: from [140.186.70.92] (port=60282 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OxcnK-0005uT-Q5 for qemu-devel@nongnu.org; Mon, 20 Sep 2010 05:36:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OxcnI-0001yE-HK for qemu-devel@nongnu.org; Mon, 20 Sep 2010 05:36:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22969) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OxcnI-0001xu-5l for qemu-devel@nongnu.org; Mon, 20 Sep 2010 05:36:16 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o8K9aDeJ003361 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 20 Sep 2010 05:36:14 -0400 Received: from mig-laptop.brq.redhat.com (mig-laptop.brq.redhat.com [10.34.26.9]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o8K9aCSM001127 for ; Mon, 20 Sep 2010 05:36:13 -0400 Message-ID: <4C972B3A.7000800@redhat.com> Date: Mon, 20 Sep 2010 11:36:58 +0200 From: Michal Novotny User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Thunderbird/3.0.4 MIME-Version: 1.0 To: "qemu-devel@nongnu.org" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Subject: [Qemu-devel] [PATCH] Fix vhost_net compilation errors for i386-softmmu target X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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). There were errors of comparison of unsigned expression was always true which made it unable to compile. This simple fix fixes the issue. ... cc1: warnings being treated as errors .../hw/vhost_net.c: In function ‘vhost_net_start’: .../vhost_net.c:154: error: comparison of unsigned expression >= 0 is always true make[1]: *** [vhost_net.o] Error 1 make: *** [subdir-i386-softmmu] Error 2 Signed-off-by: Michal Novotny 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 target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). There were errors of comparison of unsigned expression was always true which made it unable to compile. This simple fix fixes the issue. ... cc1: warnings being treated as errors .../hw/vhost_net.c: In function ‘vhost_net_start’: .../vhost_net.c:154: error: comparison of unsigned expression >= 0 is always true make[1]: *** [vhost_net.o] Error 1 make: *** [subdir-i386-softmmu] Error 2 Signed-off-by: Michal Novotny --- hw/vhost_net.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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 = -1; - while (--file.index >= 0) { + while (--file.index > 0) { int r = ioctl(net->dev.control, VHOST_NET_SET_BACKEND, &file); assert(r >= 0); } -- 1.7.2.3