[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1.1] virtio: Fix compiler warning for non Linux host
From: |
Stefan Weil |
Subject: |
[Qemu-devel] [PATCH 1.1] virtio: Fix compiler warning for non Linux hosts |
Date: |
Tue, 22 May 2012 23:23:32 +0200 |
The local variables ret, i are only used if __linux__ is defined.
Signed-off-by: Stefan Weil <address@hidden>
---
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
- [Qemu-devel] [PATCH 1.1] virtio: Fix compiler warning for non Linux hosts,
Stefan Weil <=
- Re: [Qemu-devel] [PATCH 1.1] virtio: Fix compiler warning for non Linux hosts, Stefan Hajnoczi, 2012/05/23
- Re: [Qemu-devel] [PATCH 1.1] virtio: Fix compiler warning for non Linux hosts, Stefan Weil, 2012/05/23
- Re: [Qemu-devel] [PATCH 1.1] virtio: Fix compiler warning for non Linux hosts, Kevin Wolf, 2012/05/23
- Re: [Qemu-devel] [PATCH 1.1] virtio: Fix compiler warning for non Linux hosts, Stefan Weil, 2012/05/23
- Re: [Qemu-devel] [PATCH 1.1] virtio: Fix compiler warning for non Linux hosts, Stefan Hajnoczi, 2012/05/28
- Re: [Qemu-devel] [PATCH 1.1] virtio: Fix compiler warning for non Linux hosts, Daniel P. Berrange, 2012/05/28
- Re: [Qemu-devel] [PATCH 1.1] virtio: Fix compiler warning for non Linux hosts, Peter Maydell, 2012/05/28
- Re: [Qemu-devel] [PATCH 1.1] virtio: Fix compiler warning for non Linux hosts, Anthony Liguori, 2012/05/29
- Re: [Qemu-devel] [PATCH 1.1] virtio: Fix compiler warning for non Linux hosts, Stefan Hajnoczi, 2012/05/30
- Re: [Qemu-devel] [PATCH 1.1] virtio: Fix compiler warning for non Linux hosts, Peter Maydell, 2012/05/30