From 87e00feb01e3fc1276b3c90d68db84c220e18e08 Mon Sep 17 00:00:00 2001 From: Simon Kelley Date: Fri, 16 Feb 2018 21:27:35 +0000 Subject: [PATCH] Compiler warning fixes. --- src/dnsmasq.c | 19 ++++++++++++++----- src/option.c | 4 ++-- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/dnsmasq.c b/src/dnsmasq.c index 97c4b02..c9588c4 100644 --- a/src/dnsmasq.c +++ b/src/dnsmasq.c @@ -1213,31 +1213,40 @@ static void fatal_event(struct event_desc *ev, char *msg) case EVENT_FORK_ERR: die(_("cannot fork into background: %s"), NULL, EC_MISC); - + + /* fall through */ case EVENT_PIPE_ERR: die(_("failed to create helper: %s"), NULL, EC_MISC); - + + /* fall through */ case EVENT_CAP_ERR: die(_("setting capabilities failed: %s"), NULL, EC_MISC); + /* fall through */ case EVENT_USER_ERR: die(_("failed to change user-id to %s: %s"), msg, EC_MISC); + /* fall through */ case EVENT_GROUP_ERR: die(_("failed to change group-id to %s: %s"), msg, EC_MISC); - + + /* fall through */ case EVENT_PIDFILE: die(_("failed to open pidfile %s: %s"), msg, EC_FILE); + /* fall through */ case EVENT_LOG_ERR: die(_("cannot open log %s: %s"), msg, EC_FILE); - + + /* fall through */ case EVENT_LUA_ERR: die(_("failed to load Lua script: %s"), msg, EC_MISC); + /* fall through */ case EVENT_TFTP_ERR: die(_("TFTP directory %s inaccessible: %s"), msg, EC_FILE); - + + /* fall through */ case EVENT_TIME_ERR: die(_("cannot create timestamp file %s: %s" ), msg, EC_BADCONF); } diff --git a/src/option.c b/src/option.c index e36734a..edd0e62 100644 --- a/src/option.c +++ b/src/option.c @@ -1163,7 +1163,7 @@ static int parse_dhcp_opt(char *errstr, char *arg, int flags) case 'd': case 'D': fac *= 24; - /* fall though */ + /* fall through */ case 'h': case 'H': fac *= 60; @@ -2970,7 +2970,7 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma case 'd': case 'D': fac *= 24; - /* fall though */ + /* fall through */ case 'h': case 'H': fac *= 60;