From 5d59f0f2760b246f772bf29bf194d0d31df2b0bc Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 17 Jan 2017 20:21:21 +0000 Subject: [PATCH 02/16] 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 Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98191 --- bus/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bus/main.c b/bus/main.c index 5e26820a..17750ef6 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 */ -- 2.11.0