From: Simon McVittie Date: Tue, 17 Jan 2017 20:59:57 +0000 (+0000) Subject: config-parser: assert elements are of a known type X-Git-Tag: dbus-1.11.12~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4a9083ff39e7986380cd86d1aff11e7658d7455d;p=thirdparty%2Fdbus.git 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 --- diff --git a/bus/config-parser.c b/bus/config-parser.c index 492cbc282..c8d026f9e 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;