qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix vhost_net compilation errors for i386-softmmu target
@ 2010-09-20  9:36 Michal Novotny
  2010-09-20 17:53 ` [Qemu-devel] " Michael S. Tsirkin
  2010-09-20 18:03 ` [Qemu-devel] " Blue Swirl
  0 siblings, 2 replies; 4+ messages in thread
From: Michal Novotny @ 2010-09-20  9:36 UTC (permalink / raw)
  To: qemu-devel@nongnu.org

[-- Attachment #1: Type: text/plain, Size: 736 bytes --]

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 <minovotn@redhat.com>

-- 
Michal Novotny<minovotn@redhat.com>, RHCE
Virtualization Team (xen userspace), Red Hat


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: qemu-fix-vhost_net-compilation-errors.patch --]
[-- Type: text/x-patch; name="qemu-fix-vhost_net-compilation-errors.patch", Size: 1464 bytes --]

>From 21dd405dbc871c8d0053cc68f8862665dc12f69a Mon Sep 17 00:00:00 2001
From: Michal Novotny <minovotn@redhat.com>
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 <minovotn@redhat.com>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-09-21  7:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-20  9:36 [Qemu-devel] [PATCH] Fix vhost_net compilation errors for i386-softmmu target Michal Novotny
2010-09-20 17:53 ` [Qemu-devel] " Michael S. Tsirkin
2010-09-21  7:03   ` Michal Novotny
2010-09-20 18:03 ` [Qemu-devel] " Blue Swirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).