[PATCH 12/18] mtd: ubi: annotate fallthrough

Heiko Schocher hs at denx.de
Fri Mar 28 06:03:55 CET 2025


Hello Andre,

On 27.03.25 16:33, Andre Przywara wrote:
> The UBI code uses an implicit switch/case fallthrough when handling two
> related cases of bad header errors. Also there is a switch/case for unit
> prefix handling (G/M/K), which accumulates multiplications.
> 
> Add our "fallthrough;" statement-like macro before the respective labels
> in both cases, to avoid a warning when GCC's -Wimplicit-fallthrough
> warning option is enabled.
> 
> Signed-off-by: Andre Przywara <andre.przywara at arm.com>
> ---
>   drivers/mtd/ubi/attach.c | 1 +
>   drivers/mtd/ubi/build.c  | 3 +++
>   2 files changed, 4 insertions(+)

Reviewed-by: Heiko Schocher <hs at denx.de>

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de


More information about the U-Boot mailing list