[PATCH 06/18] fastboot: annotate switch/case fallthrough case
Mattijs Korpershoek
mkorpershoek at baylibre.com
Mon Mar 31 10:04:46 CEST 2025
Hi Andre,
Thank you for the patch.
On jeu., mars 27, 2025 at 15:33, Andre Przywara <andre.przywara at arm.com> wrote:
> 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 at arm.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek at baylibre.com>
> ---
> drivers/fastboot/fb_command.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/fastboot/fb_command.c b/drivers/fastboot/fb_command.c
> index e4484d65aca..2cdbac50ac4 100644
> --- a/drivers/fastboot/fb_command.c
> +++ b/drivers/fastboot/fb_command.c
> @@ -186,6 +186,7 @@ void fastboot_multiresponse(int cmd, char *response)
> }
> break;
> }
> + fallthrough;
> default:
> fastboot_fail("Unknown multiresponse command", response);
> break;
> --
> 2.25.1
More information about the U-Boot
mailing list