From 4a9083ff39e7986380cd86d1aff11e7658d7455d Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 17 Jan 2017 20:59:57 +0000 Subject: [PATCH] config-parser: assert elements are of a known type This silences -Wswitch-default. Based on part of a patch from Thomas Zimmermann. Signed-off-by: Simon McVittie Reviewed-by: Philip Withnall Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98191 --- bus/config-parser.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bus/config-parser.c b/bus/config-parser.c index 492cbc2..c8d026f 100644 --- a/bus/config-parser.c +++ b/bus/config-parser.c @@ -2165,6 +2165,7 @@ bus_config_parser_end_element (BusConfigParser *parser, switch (e->type) { case ELEMENT_NONE: + default: _dbus_assert_not_reached ("element in stack has no type"); break; @@ -2506,6 +2507,7 @@ bus_config_parser_content (BusConfigParser *parser, switch (top_element_type (parser)) { case ELEMENT_NONE: + default: _dbus_assert_not_reached ("element at top of stack has no type"); return FALSE; -- 2.7.4