If passed an invalid DBusSystemLogSeverity, the default case for the
switch construct is to crash out with an assertion failure, but the
assertion failure itself is not compiled in if we are doing a production
build without assertions.
Detected by compiling with gcc 14, which does some static analysis
by default.
Signed-off-by: Simon McVittie <smcv@collabora.com>
#ifdef HAVE_SYSLOG_H
if (log_flags & DBUS_LOG_FLAGS_SYSTEM_LOG)
{
- int flags;
+ int flags = LOG_DAEMON | LOG_WARNING;
switch (severity)
{
case DBUS_SYSTEM_LOG_INFO: