From: José Bollo Date: Tue, 5 Sep 2017 12:35:13 +0000 (+0200) Subject: Fix warnings 'implicit-fallthrough' of gcc 7 X-Git-Tag: 4.99.1~2 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fapp-framework-main.git;a=commitdiff_plain;h=c4579930a9961da68fe9e07594a9f893f11b83d2 Fix warnings 'implicit-fallthrough' of gcc 7 Change-Id: I32b42fd8db481fcbdce4b934fc990c118293850d Signed-off-by: José Bollo --- diff --git a/src/afm-launch.c b/src/afm-launch.c index d80e43b..1a354a1 100644 --- a/src/afm-launch.c +++ b/src/afm-launch.c @@ -610,6 +610,7 @@ static union arguments instantiate_arguments( break; case '%': c = 0; + /*@fallthrough@*/ default: mini[1] = c; v = mini; diff --git a/src/afm-system-daemon.c b/src/afm-system-daemon.c index 49749bc..e0557f4 100644 --- a/src/afm-system-daemon.c +++ b/src/afm-system-daemon.c @@ -103,6 +103,7 @@ static void on_install(struct sd_bus_message *smsg, struct json_object *req, voi reload = j_boolean_at(req, "reload", 1); break; } + /*@fallthrough@*/ default: jbus_reply_error_s(smsg, error_bad_request); return; @@ -150,6 +151,7 @@ static void on_uninstall(struct sd_bus_message *smsg, struct json_object *req, v root = j_string_at(req, "root", rootdir); break; } + /*@fallthrough@*/ default: jbus_reply_error_s(smsg, error_bad_request); return; diff --git a/src/mustach.c b/src/mustach.c index 03f3cb1..9868cff 100644 --- a/src/mustach.c +++ b/src/mustach.c @@ -99,6 +99,7 @@ static int process(const char *template, struct mustach_itf *itf, void *closure, template++; } c = '&'; + /*@fallthrough@*/ case '^': case '#': case '/': diff --git a/src/wgtpkg-mustach.c b/src/wgtpkg-mustach.c index 45d94e8..4251427 100644 --- a/src/wgtpkg-mustach.c +++ b/src/wgtpkg-mustach.c @@ -62,8 +62,8 @@ static char *keyval(char *read, int isptr) } else { if (c == '\\') { switch (read[1]) { - case '\\': *write++ = c; - case '=': c = *++read; + case '\\': *write++ = c; /*@fallthrough@*/ + case '=': c = *++read; /*@fallthrough@*/ default: break; } } @@ -92,8 +92,8 @@ static char *first(char **name, int isptr) while (c && c != '/') { if (c == '~') { switch(read[1]) { - case '1': c = '/'; - case '0': read++; + case '1': c = '/'; /*@fallthrough@*/ + case '0': read++; /*@fallthrough@*/ default: break; } }