Received: from eggs.gnu.org ([208.118.235.92]:44220) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWwYL-0007Mt-O6 for qemu-devel@nongnu.org; Tue, 22 May 2012 17:23:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWwYK-00053D-28 for qemu-devel@nongnu.org; Tue, 22 May 2012 17:23:37 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:46399) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWwYJ-000531-S4 for qemu-devel@nongnu.org; Tue, 22 May 2012 17:23:35 -0400 From: Stefan Weil Date: Tue, 22 May 2012 23:23:32 +0200 Message-Id: <1337721812-30229-1-git-send-email-sw@weilnetz.de> Subject: [Qemu-devel] [PATCH 1.1] virtio: Fix compiler warning for non Linux hosts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Kevin Wolf , Paolo Bonzini , qemu-devel@nongnu.org, Stefan Weil The local variables ret, i are only used if __linux__ is defined. Signed-off-by: Stefan Weil --- 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