Assert that we don't get an undefined log level in udisks_daemon_log_valist().
This avoids falling through the switch and using uninitialized string
variables.
Fixes these warnings/errors:
cc1: warnings being treated as errors
udisksdaemon.c: In function ‘udisks_daemon_log’:
udisksdaemon.c:782:16: error: ‘level_str’ may be used uninitialized in this function
udisksdaemon.c:783:16: error: ‘level_color_str’ may be used uninitialized in this function
udisksdaemon.c:784:8: error: ‘syslog_priority’ may be used uninitialized in this function
syslog_priority = LOG_ERR;
level_color_str = _color_get (_COLOR_FG_RED);
break;
+
+ default:
+ g_assert_not_reached ();
+ break;
}
g_print ("%s%s%s.%03d:%s %s%s%s:%s %s\n",
_color_get (_COLOR_BOLD_ON), _color_get (_COLOR_FG_YELLOW),