cmd: spl: annotate switch/case fallthrough

The argument parsing in the SPL configuration command uses an implicit
switch/case fallthrough when dealing with a different number of
arguments.

Add our "fallthrough;" statement-like macro before the respective labels
in the bootm 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: Tom Rini <trini@konsulko.com>
This commit is contained in:
Andre Przywara 2025-03-27 15:33:12 +00:00 committed by Tom Rini
parent d29a90c8ce
commit 9ce2986e7e

View file

@ -60,8 +60,10 @@ static int call_bootm(int argc, char *const argv[], const char *subcommand[])
switch (argc) {
case 3:
bootm_argv[4] = argv[2]; /* fdt addr */
fallthrough;
case 2:
bootm_argv[3] = argv[1]; /* initrd addr */
fallthrough;
case 1:
bootm_argv[2] = argv[0]; /* kernel addr */
}