From e6c8bd95c0ebccde0af3458366b779c433bd5606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Mon, 4 Sep 2023 16:55:18 +0200 Subject: [PATCH] device-state: Assert on invalid values in switch statement MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: https://gitlab.gnome.org/World/Phosh/phoc/-/issues/334 Signed-off-by: Guido Günther --- src/device-state.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/device-state.c b/src/device-state.c index e5c7ad68e..6dd838cfc 100644 --- a/src/device-state.c +++ b/src/device-state.c @@ -161,6 +161,7 @@ handle_get_tablet_mode_switch (struct wl_client *client, break; default: /* nothing to do */ + g_assert_not_reached (); } self->tablet_mode_switches = g_slist_prepend (self->tablet_mode_switches, @@ -254,6 +255,7 @@ handle_get_lid_switch (struct wl_client *client, break; default: /* nothing to do */ + g_assert_not_reached (); } self->lid_switches = g_slist_prepend (self->lid_switches, -- GitLab