summaryrefslogtreecommitdiff
path: root/cmd/pmic.c
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2025-03-27 15:33:11 +0000
committerTom Rini <trini@konsulko.com>2025-04-08 16:23:51 -0600
commitd29a90c8ce4a2e27f502f5ac5a051f7bcfd66e11 (patch)
treeaeb5d9d113feb54d7acce875ff19eb98b7b67ba5 /cmd/pmic.c
parent3f61113c276ffe52380cec159b47e6024249ee2d (diff)
cmd: pmic: annotate switch/case fallthrough
The argument parsing code in the pmic command uses an implicit switch/case fallthrough to handle the common part of having one or two arguments. Add our "fallthrough;" statement-like macro before the second branch in the parsing 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>
Diffstat (limited to 'cmd/pmic.c')
-rw-r--r--cmd/pmic.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmd/pmic.c b/cmd/pmic.c
index 3ad1b8aa375..e5fc8f97b75 100644
--- a/cmd/pmic.c
+++ b/cmd/pmic.c
@@ -34,6 +34,7 @@ static int do_dev(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
printf("Can't get PMIC: %s!\n", name);
return failure(ret);
}
+ fallthrough;
case 1:
if (!currdev) {
printf("PMIC device is not set!\n\n");