From 58f0be50fd28e8ecd33b108a8b270433ed413598 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 17 Jan 2017 20:59:57 +0000 Subject: [PATCH 13/16] 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 --- bus/config-parser.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bus/config-parser.c b/bus/config-parser.c index 492cbc28..c8d026f9 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.11.0