[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 1/5] virtio: Fix compiler warning for non Linux host

From: Kevin Wolf
Subject: [Qemu-devel] [PATCH 1/5] virtio: Fix compiler warning for non Linux hosts
Date: Wed, 30 May 2012 15:37:12 +0200

From: Stefan Weil <address@hidden>

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

Signed-off-by: Stefan Weil <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
 hw/virtio-blk.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

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 
 static void virtio_blk_handle_scsi(VirtIOBlockReq *req)
+#ifdef __linux__
     int ret;
-    int status = VIRTIO_BLK_S_OK;
     int i;
+    int status = VIRTIO_BLK_S_OK;
      * We require at least one output segment each for the virtio_blk_outhdr

reply via email to

[Prev in Thread] Current Thread [Next in Thread]