diff options
author | Guillem Jover <guillem@debian.org> | 2017-02-22 22:44:29 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2017-02-26 23:43:01 +0100 |
commit | 63bf76937536f21b5ec110c75c166c3d7b343c76 (patch) | |
tree | 4c2c2e0a7a25e7b14e8220aa9765498665755011 /src | |
parent | 7b1b21e4c94ca046141e4d13bd96a0a3d1b6169f (diff) | |
download | dpkg-63bf76937536f21b5ec110c75c166c3d7b343c76.tar.gz |
dpkg: Add a comment on any switch case that falls through
Warned-by: gcc-7
Diffstat (limited to 'src')
-rw-r--r-- | src/archives.c | 1 | ||||
-rw-r--r-- | src/depcon.c | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/archives.c b/src/archives.c index 840dd2948..d91a07588 100644 --- a/src/archives.c +++ b/src/archives.c @@ -851,6 +851,7 @@ tarobject(void *ctx, struct tar_entry *ti) switch (otherpkg->clientdata->replacingfilesandsaid) { case 2: keepexisting = true; + /* Fall through. */ case 1: continue; } diff --git a/src/depcon.c b/src/depcon.c index 2515f3a10..924c53ac8 100644 --- a/src/depcon.c +++ b/src/depcon.c @@ -420,8 +420,7 @@ depisok(struct dependency *dep, struct varbuf *whynot, case PKG_STAT_TRIGGERSAWAITED: if (canfixbytrigaw && versionsatisfied(&pkg_pos->installed, possi)) *canfixbytrigaw = pkg_pos; - /* Fall through to have a chance to return OK due to - * allowunconfigd and to fill the explanation */ + /* Fall through. */ case PKG_STAT_UNPACKED: case PKG_STAT_HALFCONFIGURED: if (allowunconfigd) { @@ -581,6 +580,7 @@ depisok(struct dependency *dep, struct varbuf *whynot, case PKG_STAT_HALFCONFIGURED: if (dep->type == dep_breaks) break; /* No problem. */ + /* Fall through. */ case PKG_STAT_INSTALLED: case PKG_STAT_TRIGGERSPENDING: case PKG_STAT_TRIGGERSAWAITED: @@ -651,6 +651,7 @@ depisok(struct dependency *dep, struct varbuf *whynot, case PKG_ISTOBE_DECONFIGURE: if (dep->type == dep_breaks) continue; /* Already deconfiguring. */ + /* Fall through. */ case PKG_ISTOBE_NORMAL: case PKG_ISTOBE_PREINSTALL: switch (provider->up->up->status) { @@ -662,6 +663,7 @@ depisok(struct dependency *dep, struct varbuf *whynot, case PKG_STAT_HALFCONFIGURED: if (dep->type == dep_breaks) break; /* No problem. */ + /* Fall through. */ case PKG_STAT_INSTALLED: case PKG_STAT_TRIGGERSPENDING: case PKG_STAT_TRIGGERSAWAITED: |