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 <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98191
This commit is contained in:
Simon McVittie 2017-01-17 20:49:31 +00:00 committed by Simon McVittie
parent 053c48c035
commit b044fa0c70
2 changed files with 6 additions and 0 deletions

View file

@ -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");
}

View file

@ -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;
}
}