diff options
author | Thomas Zimmermann <tdz@users.sourceforge.net> | 2016-10-13 23:16:33 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2017-01-17 17:20:53 +0000 |
commit | 8fba673e9296bca29ab65a182e6425f7779eae20 (patch) | |
tree | 280c53e68d7e30c84fd5cd918e2df37e33cf289f /bus/config-parser-trivial.c | |
parent | 21eb3317c569cfd02d799aa67ae3ecf611373cab (diff) | |
download | dbus-8fba673e9296bca29ab65a182e6425f7779eae20.tar.gz |
Trivial config parser: enumerate the elements we don't care about
This quiets -Wswitch-enum warnings. The trivial config parser
is used by the setuid activation helper, and only handles the
elements whose contents influence the operation of that helper:
system service directories, the setuid activation helper itself,
the bus uid, and the bus type.
[smcv: split out from a larger commit; add justification; move
ELEMENT_SERVICEDIR start handler to a functionally equivalent list
of elements whose content we are going to process later]
Reviewed-by: Simon McVittie <smcv@debian.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98191
Diffstat (limited to 'bus/config-parser-trivial.c')
-rw-r--r-- | bus/config-parser-trivial.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/bus/config-parser-trivial.c b/bus/config-parser-trivial.c index 129431da..d085fe7f 100644 --- a/bus/config-parser-trivial.c +++ b/bus/config-parser-trivial.c @@ -162,6 +162,7 @@ bus_config_parser_start_element (BusConfigParser *parser, switch (parser->type) { + case ELEMENT_SERVICEDIR: case ELEMENT_SERVICEHELPER: case ELEMENT_USER: case ELEMENT_CONFIGTYPE: @@ -185,6 +186,26 @@ bus_config_parser_start_element (BusConfigParser *parser, break; } + case ELEMENT_NONE: + case ELEMENT_BUSCONFIG: + case ELEMENT_INCLUDE: + case ELEMENT_LISTEN: + case ELEMENT_AUTH: + case ELEMENT_POLICY: + case ELEMENT_LIMIT: + case ELEMENT_ALLOW: + case ELEMENT_DENY: + case ELEMENT_FORK: + case ELEMENT_PIDFILE: + case ELEMENT_INCLUDEDIR: + case ELEMENT_SELINUX: + case ELEMENT_ASSOCIATE: + case ELEMENT_STANDARD_SESSION_SERVICEDIRS: + case ELEMENT_KEEP_UMASK: + case ELEMENT_SYSLOG: + case ELEMENT_ALLOW_ANONYMOUS: + case ELEMENT_APPARMOR: + /* fall through */ default: { /* we really don't care about the others... */ @@ -286,6 +307,28 @@ bus_config_parser_content (BusConfigParser *parser, } } break; + + case ELEMENT_NONE: + case ELEMENT_BUSCONFIG: + case ELEMENT_INCLUDE: + case ELEMENT_LISTEN: + case ELEMENT_AUTH: + case ELEMENT_POLICY: + case ELEMENT_LIMIT: + case ELEMENT_ALLOW: + case ELEMENT_DENY: + case ELEMENT_FORK: + case ELEMENT_PIDFILE: + case ELEMENT_INCLUDEDIR: + case ELEMENT_SELINUX: + case ELEMENT_ASSOCIATE: + case ELEMENT_STANDARD_SESSION_SERVICEDIRS: + case ELEMENT_STANDARD_SYSTEM_SERVICEDIRS: + case ELEMENT_KEEP_UMASK: + case ELEMENT_SYSLOG: + case ELEMENT_ALLOW_ANONYMOUS: + case ELEMENT_APPARMOR: + /* fall through */ default: { /* we don't care about the others... really */ |