]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commitdiff
virtio: Fix compiler warning for non Linux hosts
authorStefan Weil <sw@weilnetz.de>
Tue, 22 May 2012 21:23:32 +0000 (23:23 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 25 Jun 2012 14:04:04 +0000 (09:04 -0500)
The local variables ret, i are only used if __linux__ is defined.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit 47ce9ef7f89032c4079bf5132a12d1bfd4d5bca5)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/virtio-blk.c

index 4f5745033ea6a1512587fb19825ed103fa4ddadc..fe0774617b54c96417790f278e4d000bf1976a3a 100644 (file)
@@ -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