]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
cmd: convert fallthrough comment.
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 1 Apr 2023 07:14:11 +0000 (09:14 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 6 Apr 2023 23:10:08 +0000 (19:10 -0400)
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>
cmd/date.c

index 58505e6e1d3e94baead9c8562c7ea8b328526e7f..fe9c8c6534ecaa55e46dc00721f7970874f9d8df 100644 (file)
@@ -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);