diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2023-04-01 09:14:11 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-04-06 19:10:08 -0400 |
commit | 06a94b3e8b81bf679391e66441ff6b0051836f03 (patch) | |
tree | 2b8e9d52271c00eed39c301739d756ecf6859286 /cmd | |
parent | 9ee32a7876f4372fd0f5515a27b2c148a8e8a19c (diff) | |
download | u-boot-06a94b3e8b81bf679391e66441ff6b0051836f03.zip u-boot-06a94b3e8b81bf679391e66441ff6b0051836f03.tar.gz u-boot-06a94b3e8b81bf679391e66441ff6b0051836f03.tar.bz2 |
cmd: convert fallthrough comment.
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 <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/date.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |