On Wed, Oct 05, 2016 at 16:52:08 +0300, Nikolay Shirokovskiy wrote:
---
src/qemu/qemu_monitor_json.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index e1494df..6c2884d 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -841,10 +841,8 @@ qemuMonitorJSONHandleBlockJobImpl(qemuMonitorPtr mon,
case VIR_DOMAIN_BLOCK_JOB_CANCELED:
case VIR_DOMAIN_BLOCK_JOB_READY:
break;
- case VIR_DOMAIN_BLOCK_JOB_FAILED:
- case VIR_DOMAIN_BLOCK_JOB_LAST:
- VIR_DEBUG("should not get here");
- break;
+ default:
+ VIR_WARN("unexpected block job type: %d", event);
}
NACK, we intentionally don't use default branches. Default switch
branch disables GCC warnings in case any enum item is not handled.
Runtime warnings are invisible while compile time warnings are very easy
to spot.
Jirka