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 4433730..1234ee5 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;
        }