diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2023-08-25 13:05:19 +0200 |
---|---|---|
committer | Elyes Haouas <ehaouas@noos.fr> | 2023-08-28 02:12:25 +0000 |
commit | 0ba81d7db377e37e9e50ce243e173e1bcfa33e9a (patch) | |
tree | fb57b21b29bcedc417b8445d66da410f957f225b /payloads/libpayload/curses/PDCurses | |
parent | d7173943843a1a68b13b681f923cf45557881e05 (diff) |
libpayload: Fix clang fallthrough warning
Clang does not recognize comments to indicate falltrough is intended
behavior.
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: Idcf7a24fc763b80863902702172b4ea950e132b8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77431
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Diffstat (limited to 'payloads/libpayload/curses/PDCurses')
-rw-r--r-- | payloads/libpayload/curses/PDCurses/pdcurses/addch.c | 4 | ||||
-rw-r--r-- | payloads/libpayload/curses/PDCurses/pdcurses/scanw.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/payloads/libpayload/curses/PDCurses/pdcurses/addch.c b/payloads/libpayload/curses/PDCurses/pdcurses/addch.c index 5934b54b96..12f767f7e6 100644 --- a/payloads/libpayload/curses/PDCurses/pdcurses/addch.c +++ b/payloads/libpayload/curses/PDCurses/pdcurses/addch.c @@ -173,8 +173,10 @@ int waddch(WINDOW *win, const chtype ch) /* don't back over left margin */ if (--x < 0) - case '\r': x = 0; + break; + case '\r': + x = 0; break; diff --git a/payloads/libpayload/curses/PDCurses/pdcurses/scanw.c b/payloads/libpayload/curses/PDCurses/pdcurses/scanw.c index d1fd908dab..97eaf70b4f 100644 --- a/payloads/libpayload/curses/PDCurses/pdcurses/scanw.c +++ b/payloads/libpayload/curses/PDCurses/pdcurses/scanw.c @@ -274,7 +274,7 @@ static int _pdc_vsscanf(const char *buf, const char *fmt, va_list arg_ptr) NEXT(c); goto string; } - /* fall through */ + __fallthrough; default: if (fmt[1] == '-' && fmt[2] && f < (unsigned char)fmt[2]) |