Add back fallthrough annotations removed by 7f3afab (#148032)

The original commit removed them to avoid the dependency on llvm Support
because of LLVM_FALLTHROUGH, but this triggers `-Wimplicit-fallthrough`
warnings.

LLVM requires a C++17 compiler now, so we should be able to use the
standard [[fallthrough]] attribute.
This commit is contained in:
Jorge Gorbe Moya 2025-07-10 12:02:34 -07:00 committed by GitHub
parent 03f6f48b73
commit 00dd6660c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -104,25 +104,24 @@ void siphash(const unsigned char *in, uint64_t inlen,
switch (left) {
case 7:
b |= ((uint64_t)ni[6]) << 48;
/* FALLTHRU */
[[fallthrough]];
case 6:
b |= ((uint64_t)ni[5]) << 40;
/* FALLTHRU */
[[fallthrough]];
case 5:
b |= ((uint64_t)ni[4]) << 32;
/* FALLTHRU */
[[fallthrough]];
case 4:
b |= ((uint64_t)ni[3]) << 24;
/* FALLTHRU */
[[fallthrough]];
case 3:
b |= ((uint64_t)ni[2]) << 16;
/* FALLTHRU */
[[fallthrough]];
case 2:
b |= ((uint64_t)ni[1]) << 8;
/* FALLTHRU */
[[fallthrough]];
case 1:
b |= ((uint64_t)ni[0]);
/* FALLTHRU */
break;
case 0:
break;