DBusTransport: be explicit about _dbus_auth_do_work() results
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Tue, 17 Jan 2017 20:50:08 +0000 (20:50 +0000)
committerSimon McVittie <smcv@collabora.com>
Fri, 7 Apr 2017 13:02:13 +0000 (14:02 +0100)
commitb706b9eabe38e19e18daeac7ea60568c9081cbcb
tree5ba0af4199470267f6c26115acca2048bff96173
parentdd72fed8c5ad9ebd8d88271a4eb89b3b0b8097eb
DBusTransport: be explicit about _dbus_auth_do_work() results

Explicitly enumerate the states where we reset the maybe_authenticated
flag, and assert that _dbus_auth_do_work() doesn't return an impossible
or invalid state (by source code inspection, it doesn't).

This silences -Wswitch-enum. 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
dbus/dbus-transport.c