summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-09-05 14:35:13 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-09-05 14:35:13 +0200
commitc4579930a9961da68fe9e07594a9f893f11b83d2 (patch)
tree4d1eb2262e049ca284db806aae8fa33290ba17dd
parent037d537b635b5136f0ffe25627dcac8a810c7418 (diff)
Fix warnings 'implicit-fallthrough' of gcc 7
Change-Id: I32b42fd8db481fcbdce4b934fc990c118293850d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--src/afm-launch.c1
-rw-r--r--src/afm-system-daemon.c2
-rw-r--r--src/mustach.c1
-rw-r--r--src/wgtpkg-mustach.c8
4 files changed, 8 insertions, 4 deletions
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;
}
}