fastboot: annotate switch/case fallthrough case
authorAndre Przywara <andre.przywara@arm.com>
Thu, 27 Mar 2025 15:33:01 +0000 (15:33 +0000)
committerTom Rini <trini@konsulko.com>
Tue, 8 Apr 2025 22:23:51 +0000 (16:23 -0600)
The fastboot command handling uses an implicit switch/case fallthrough
when receiving the OEM_CONSOLE command, but when this command is not
enabled in Kconfig, to report this command as unknown.

Add our "fallthrough;" statement-like macro before the default branch in
the fastboot code, to avoid a warning when GCC's -Wimplicit-fallthrough
warning option is enabled.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
drivers/fastboot/fb_command.c

index e4484d6..2cdbac5 100644 (file)
@@ -186,6 +186,7 @@ void fastboot_multiresponse(int cmd, char *response)
                        }
                        break;
                }
+               fallthrough;
        default:
                fastboot_fail("Unknown multiresponse command", response);
                break;