diff options
| author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2025-10-28 14:08:30 -0300 |
|---|---|---|
| committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2025-10-29 12:54:01 -0300 |
| commit | 970364dac00b38333e5b2d91c90d11e80141d265 (patch) | |
| tree | d377fe0f387866a60bdbbc4d2e54b10e45b438d4 /stdio-common | |
| parent | 543ddd628f731ef2080c07f7abe3476b3fc86d11 (diff) | |
Annotate swtich fall-through
The clang default to warning for missing fall-through and it does
not support all comment-like annotation that gcc does. Use C23
[[fallthrough]] annotation instead.
proper attribute instead.
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
Diffstat (limited to 'stdio-common')
| -rw-r--r-- | stdio-common/printf-parsemb.c | 2 | ||||
| -rw-r--r-- | stdio-common/vfscanf-internal.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/stdio-common/printf-parsemb.c b/stdio-common/printf-parsemb.c index a7ba52a9fa..21625036d7 100644 --- a/stdio-common/printf-parsemb.c +++ b/stdio-common/printf-parsemb.c @@ -272,7 +272,7 @@ __parse_one_specmb (const UCHAR_T *format, size_t posn, if (*format != L_('l')) break; ++format; - /* FALLTHROUGH */ + [[fallthrough]] ; case L_('L'): /* doubles are long doubles, and ints are long long ints. */ case L_('q'): diff --git a/stdio-common/vfscanf-internal.c b/stdio-common/vfscanf-internal.c index c6361f74e0..0870a42c4e 100644 --- a/stdio-common/vfscanf-internal.c +++ b/stdio-common/vfscanf-internal.c @@ -915,7 +915,7 @@ __vfscanf_internal (FILE *s, const char *format, va_list argptr, break; } - /* FALLTHROUGH */ + [[fallthrough]]; case L_('C'): if (width == -1) width = 1; @@ -1258,7 +1258,7 @@ __vfscanf_internal (FILE *s, const char *format, va_list argptr, } break; } - /* FALLTHROUGH */ + [[fallthrough]] ; case L_('S'): { |
