From 06a94b3e8b81bf679391e66441ff6b0051836f03 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sat, 1 Apr 2023 09:14:11 +0200 Subject: [PATCH] cmd: convert fallthrough comment. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit gcc does not understand /* FALL TROUGH */ and emits a warning: cmd/date.c: In function ‘do_date’: cmd/date.c:62:20: warning: this statement may fall through [-Wimplicit-fallthrough=] 62 | if (strcmp(argv[1],"reset") == 0) { | ^ cmd/date.c:102:9: note: here 102 | case 1: /* get date & time */ | ^~~~ Use the fallthrough macro instead. Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- cmd/date.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/date.c b/cmd/date.c index 58505e6e1d..fe9c8c6534 100644 --- a/cmd/date.c +++ b/cmd/date.c @@ -98,7 +98,7 @@ static int do_date(struct cmd_tbl *cmdtp, int flag, int argc, puts("## Get date failed\n"); } } - /* FALL TROUGH */ + fallthrough; case 1: /* get date & time */ #ifdef CONFIG_DM_RTC rcode = dm_rtc_get(dev, &tm); -- 2.39.5