提交 47ce9ef7 编写于 作者: S Stefan Weil 提交者: Kevin Wolf

virtio: Fix compiler warning for non Linux hosts

The local variables ret, i are only used if __linux__ is defined.
Signed-off-by: NStefan Weil <sw@weilnetz.de>
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
上级 e78bd5ab
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册