Commit 47ce9ef7 authored by Stefan Weil's avatar Stefan Weil Committed by Kevin Wolf
Browse files

virtio: Fix compiler warning for non Linux hosts



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

Signed-off-by: default avatarStefan Weil <sw@weilnetz.de>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent e78bd5ab
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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