mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-09-06 05:31:50 +00:00
kvm tools: Fix compilation issue in virtio-blk.c
This patch fixes the following error in virtio-blk.c: virtio-blk.c: In function ‘virtio_blk_do_io_request’: virtio-blk.c:125:6: error: variable ‘err’ set but not used [-Werror=unused-but-set-variable] cc1: all warnings being treated as errors Signed-off-by: Giuseppe Calderaro <giuseppecalderaro@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
committed by
Will Deacon
parent
9ee67e6064
commit
92b555b220
@@ -139,9 +139,13 @@ static bool virtio_blk_do_io_request(struct kvm *self, struct virt_queue *queue)
|
||||
switch (req->type) {
|
||||
case VIRTIO_BLK_T_IN:
|
||||
err = disk_image__read_sector(self->disk_image, req->sector, block, block_len);
|
||||
if (err)
|
||||
io_error = true;
|
||||
break;
|
||||
case VIRTIO_BLK_T_OUT:
|
||||
err = disk_image__write_sector(self->disk_image, req->sector, block, block_len);
|
||||
if (err)
|
||||
io_error = true;
|
||||
break;
|
||||
default:
|
||||
warning("request type %d", req->type);
|
||||
|
||||
Reference in New Issue
Block a user