qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1.1] virtio: Fix compiler warning for non Linux hosts
@ 2012-05-22 21:23 Stefan Weil
  2012-05-23  8:09 ` Stefan Hajnoczi
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Weil @ 2012-05-22 21:23 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Kevin Wolf, Paolo Bonzini, qemu-devel, Stefan Weil

The local variables ret, i are only used if __linux__ is defined.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 hw/virtio-blk.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index f9e1896..60750cb 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -147,9 +147,11 @@ static VirtIOBlockReq *virtio_blk_get_request(VirtIOBlock *s)
 
 static void virtio_blk_handle_scsi(VirtIOBlockReq *req)
 {
+#ifdef __linux__
     int ret;
-    int status = VIRTIO_BLK_S_OK;
     int i;
+#endif
+    int status = VIRTIO_BLK_S_OK;
 
     /*
      * We require at least one output segment each for the virtio_blk_outhdr
-- 
1.7.10

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

end of thread, other threads:[~2012-05-28 14:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-22 21:23 [Qemu-devel] [PATCH 1.1] virtio: Fix compiler warning for non Linux hosts Stefan Weil
2012-05-23  8:09 ` Stefan Hajnoczi
2012-05-23 15:29   ` Stefan Weil
2012-05-23 15:32     ` Kevin Wolf
2012-05-23 16:03       ` Stefan Weil
2012-05-28 12:39         ` Stefan Hajnoczi
2012-05-28 12:48           ` Daniel P. Berrange
2012-05-28 12:52           ` Peter Maydell
2012-05-28 14:14   ` Andreas Färber

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).