mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-20 01:12:17 +08:00
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>
This commit is contained in:
@@ -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'):
|
||||
|
||||
@@ -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'):
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user