From 02dd2f2df7cbd8bb39c122e827c27b4a765ff8bc Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 16 May 2021 18:04:18 +0200 Subject: [PATCH] fix unannotated fall-through warnings Signed-off-by: Felix Fietkau --- interface.c | 3 ++- 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; -- 2.30.2