summaryrefslogtreecommitdiff
path: root/bus
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2017-01-17 20:59:57 +0000
committerSimon McVittie <smcv@collabora.com>2017-04-07 12:08:30 +0100
commit4a9083ff39e7986380cd86d1aff11e7658d7455d (patch)
treec32936a5804071fd77f901b775d8fdc5906881e1 /bus
parent0662985ab72d3eb0a7d4f5c7a0ffb755e91e6810 (diff)
downloaddbus-4a9083ff39e7986380cd86d1aff11e7658d7455d.tar.gz
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 <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98191
Diffstat (limited to 'bus')
-rw-r--r--bus/config-parser.c2
1 files changed, 2 insertions, 0 deletions
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;