diff options
author | Felix Fietkau <nbd@nbd.name> | 2021-05-16 18:04:18 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-05-16 18:04:18 +0200 |
commit | 02dd2f2df7cbd8bb39c122e827c27b4a765ff8bc (patch) | |
tree | 3ba4100433956d82ca5ff9b00ec62303a800ca0d | |
parent | 327da9895327bc56b23413ee91a6e6b6e0e4329d (diff) | |
download | netifd-02dd2f2df7cbd8bb39c122e827c27b4a765ff8bc.tar.gz |
fix unannotated fall-through warnings
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r-- | interface.c | 3 | ||||
-rw-r--r-- | proto-shell.c | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/interface.c b/interface.c index ccae915..2a8f604 100644 --- a/interface.c +++ b/interface.c @@ -245,7 +245,7 @@ interface_event(struct interface *iface, enum interface_event ev) case IFEV_UP: interface_error_flush(iface); adev = iface->l3_dev.dev; - /* fall through */ + fallthrough; case IFEV_DOWN: case IFEV_UP_FAILED: alias_notify_device(iface->name, adev); @@ -319,6 +319,7 @@ __interface_set_down(struct interface *iface, bool force) case IFS_DOWN: if (iface->main_dev.dev) device_release(&iface->main_dev); + break; case IFS_TEARDOWN: default: break; diff --git a/proto-shell.c b/proto-shell.c index 2662216..e20d539 100644 --- a/proto-shell.c +++ b/proto-shell.c @@ -208,7 +208,7 @@ proto_shell_handler(struct interface_proto_state *proto, return 0; } /* if no script task is running */ - /* fall through */ + fallthrough; case S_IDLE: action = "teardown"; state->renew_pending = false; @@ -292,7 +292,7 @@ proto_shell_task_finish(struct proto_shell_state *state, case S_IDLE: if (task == &state->proto_task) state->proto.proto_event(&state->proto, IFPEV_LINK_LOST); - /* fall through */ + fallthrough; case S_SETUP: if (task == &state->proto_task) proto_shell_handler(&state->proto, PROTO_CMD_TEARDOWN, @@ -764,7 +764,7 @@ proto_shell_setup_failed(struct proto_shell_state *state) switch (state->sm) { case S_IDLE: state->proto.proto_event(&state->proto, IFPEV_LINK_LOST); - /* fall through */ + fallthrough; case S_SETUP: proto_shell_handler(&state->proto, PROTO_CMD_TEARDOWN, false); break; |