aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio-blk.c
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2012-05-22 23:23:32 +0200
committerKevin Wolf <kwolf@redhat.com>2012-05-30 09:49:49 +0200
commit47ce9ef7f89032c4079bf5132a12d1bfd4d5bca5 (patch)
treee62646305d764cddd5d38eff9233ac0904a265dd /hw/virtio-blk.c
parente78bd5ab07d65fec77fcae468b2836c79a836d49 (diff)
downloadqemu-47ce9ef7f89032c4079bf5132a12d1bfd4d5bca5.zip
qemu-47ce9ef7f89032c4079bf5132a12d1bfd4d5bca5.tar.gz
qemu-47ce9ef7f89032c4079bf5132a12d1bfd4d5bca5.tar.bz2
virtio: Fix compiler warning for non Linux hosts
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>
Diffstat (limited to 'hw/virtio-blk.c')
-rw-r--r--hw/virtio-blk.c4
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 *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