From: Simon McVittie Date: Tue, 17 Jan 2017 20:21:21 +0000 (+0000) Subject: dbus-daemon: silence -Wswitch-default X-Git-Tag: dbus-1.11.12~19 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6883d9f3007cb736aa7759488b911221225245ba;p=thirdparty%2Fdbus.git dbus-daemon: silence -Wswitch-default There should be no way signal_handler() can be called for a signal we didn't ask for. If it somehow happens, ignore it. Based on a patch from Thomas Zimmermann. Signed-off-by: Simon McVittie Reviewed-by: Philip Withnall Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98191 --- diff --git a/bus/main.c b/bus/main.c index 5e26820ae..17750ef6e 100644 --- a/bus/main.c +++ b/bus/main.c @@ -128,6 +128,11 @@ signal_handler (int sig) } } break; + + default: + /* can't happen unless this signal handler gets used for a wrong + * signal, but keep -Wswitch-default happy */ + break; } } #endif /* DBUS_UNIX */