hyperv: handle missing switch enum cases

Ensure all enum cases are listed in switch statements. This improves
debug logging integration with openwsman.

Reviewed-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2018-02-14 09:43:59 +00:00
parent 7c8f1436d0
commit 3b558c6b04

View File

@ -1656,13 +1656,27 @@ hypervDebugHandler(const char *message, debug_level_e level,
switch (level) {
case DEBUG_LEVEL_ERROR:
case DEBUG_LEVEL_CRITICAL:
VIR_ERROR(_("openwsman error: %s"), message);
case DEBUG_LEVEL_ALWAYS:
VIR_ERROR(_("openwsman: %s"), message);
break;
case DEBUG_LEVEL_WARNING:
VIR_WARN("openwsman warning: %s", message);
VIR_WARN("openwsman: %s", message);
break;
case DEBUG_LEVEL_MESSAGE:
VIR_INFO("openwsman: %s", message);
break;
case DEBUG_LEVEL_INFO:
VIR_INFO("openwsman: %s", message);
break;
case DEBUG_LEVEL_DEBUG:
VIR_DEBUG("openwsman: %s", message);
break;
case DEBUG_LEVEL_NONE:
default:
/* Ignore the rest */
break;