]> git.tue.mpg.de Git - paraslash.git/commitdiff
aft: Avoid implicit fallthrough in switch statement.
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 27 Jan 2018 11:08:04 +0000 (12:08 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sat, 27 Jan 2018 11:11:51 +0000 (12:11 +0100)
The missing return statement causes gcc-7 to complain:

aft.c:2579:3: warning: this statement may fall through [-Wimplicit-fallthrough=]

And indeed, this fall through was not intended when the code in
question was introduced some months ago in commit a7a8d30e (Update
status items on blob events).

The issue is benign though, because also after falling through we
return 0.

aft.c

diff --git a/aft.c b/aft.c
index 4433730647f1e95452fdfbd1853b563abf5e43fe..1234ee5a35aa8fdbe93ba225ef511e88205336d4 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -2577,6 +2577,7 @@ static int aft_event_handler(enum afs_events event, struct para_buffer *pb,
                 * every time.
                 */
                make_status_items();
+               return 0;
        } default:
                return 0;
        }