qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] block: fix implicit convertion to invalid type


From: Igor Mammedov
Subject: [Qemu-devel] [PATCH] block: fix implicit convertion to invalid type
Date: Thu, 16 Oct 2014 14:10:06 +0200

change type of variable to expected IoOperationType which fixes compile
warning:

block.c:3655:20: warning: implicit conversion from enumeration
 type enum IoOperationType to different enumeration type BlockErrorAction

Signed-off-by: Igor Mammedov <address@hidden>
---
 block.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/block.c b/block.c
index 27533f3..c15fad0 100644
--- a/block.c
+++ b/block.c
@@ -3650,10 +3650,10 @@ static void send_qmp_error_event(BlockDriverState *bs,
                                  BlockErrorAction action,
                                  bool is_read, int error)
 {
-    BlockErrorAction ac;
+    IoOperationType op;
 
-    ac = is_read ? IO_OPERATION_TYPE_READ : IO_OPERATION_TYPE_WRITE;
-    qapi_event_send_block_io_error(bdrv_get_device_name(bs), ac, action,
+    op = is_read ? IO_OPERATION_TYPE_READ : IO_OPERATION_TYPE_WRITE;
+    qapi_event_send_block_io_error(bdrv_get_device_name(bs), op, action,
                                    bdrv_iostatus_is_enabled(bs),
                                    error == ENOSPC, strerror(error),
                                    &error_abort);
-- 
1.9.3 (Apple Git-50)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]