From ab12e55bacc2052a3ceb2632036b003fb155f977 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 17 Jan 2017 20:49:31 +0000 Subject: [PATCH 08/16] DBusTransport: assert that invalid results don't happen This silences -Wswitch-default. Based on part of a patch from Thomas Zimmermann. Signed-off-by: Simon McVittie --- dbus/dbus-transport-socket.c | 3 +++ dbus/dbus-transport.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/dbus/dbus-transport-socket.c b/dbus/dbus-transport-socket.c index 0b8efe7f..05acde0c 100644 --- a/dbus/dbus-transport-socket.c +++ b/dbus/dbus-transport-socket.c @@ -476,6 +476,9 @@ do_authentication (DBusTransport *transport, _dbus_verbose (" %s auth state: authenticated\n", TRANSPORT_SIDE (transport)); break; + + case DBUS_AUTH_STATE_INVALID: + /* fall through */ default: _dbus_assert_not_reached ("invalid auth state"); } diff --git a/dbus/dbus-transport.c b/dbus/dbus-transport.c index 9ff9bef6..b1932c32 100644 --- a/dbus/dbus-transport.c +++ b/dbus/dbus-transport.c @@ -410,6 +410,9 @@ _dbus_transport_open (DBusAddressEntry *entry, _DBUS_ASSERT_ERROR_IS_SET (&tmp_error); goto out; break; + default: + _dbus_assert_not_reached ("invalid transport open result"); + break; } } -- 2.11.0