From 9ce2986e7e57277bac3c528412c0bb4443b7003a Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Thu, 27 Mar 2025 15:33:12 +0000 Subject: [PATCH] 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 Reviewed-by: Tom Rini --- cmd/spl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/spl.c b/cmd/spl.c index 76fe33762df..379b512f1ff 100644 --- a/cmd/spl.c +++ b/cmd/spl.c @@ -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 */ } -- 2.39.5