dbus-daemon: silence -Wswitch-default
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Tue, 17 Jan 2017 20:21:21 +0000 (20:21 +0000)
committerSimon McVittie <smcv@collabora.com>
Fri, 7 Apr 2017 11:06:30 +0000 (12:06 +0100)
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 <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98191

bus/main.c

index 5e26820..17750ef 100644 (file)
@@ -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 */