fix unannotated fall-through warnings
authorFelix Fietkau <nbd@nbd.name>
Sun, 16 May 2021 16:04:18 +0000 (18:04 +0200)
committerFelix Fietkau <nbd@nbd.name>
Sun, 16 May 2021 16:04:18 +0000 (18:04 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
interface.c
proto-shell.c

index ccae915ef27ebaa597db24b5c0dcb8abdc22bf51..2a8f604207c3fdd1e47348274fce0428727906bf 100644 (file)
@@ -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;
index 26622165df51daaf8e513df5f3254319a2cfa0d2..e20d53961592d614123c03fa7057d3d31f061fb2 100644 (file)
@@ -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;