Skip to content

Commit 00dd666

Browse files
authored
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.
1 parent 03f6f48 commit 00dd666

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

third-party/siphash/include/siphash/SipHash.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,25 +104,24 @@ void siphash(const unsigned char *in, uint64_t inlen,
104104
switch (left) {
105105
case 7:
106106
b |= ((uint64_t)ni[6]) << 48;
107-
/* FALLTHRU */
107+
[[fallthrough]];
108108
case 6:
109109
b |= ((uint64_t)ni[5]) << 40;
110-
/* FALLTHRU */
110+
[[fallthrough]];
111111
case 5:
112112
b |= ((uint64_t)ni[4]) << 32;
113-
/* FALLTHRU */
113+
[[fallthrough]];
114114
case 4:
115115
b |= ((uint64_t)ni[3]) << 24;
116-
/* FALLTHRU */
116+
[[fallthrough]];
117117
case 3:
118118
b |= ((uint64_t)ni[2]) << 16;
119-
/* FALLTHRU */
119+
[[fallthrough]];
120120
case 2:
121121
b |= ((uint64_t)ni[1]) << 8;
122-
/* FALLTHRU */
122+
[[fallthrough]];
123123
case 1:
124124
b |= ((uint64_t)ni[0]);
125-
/* FALLTHRU */
126125
break;
127126
case 0:
128127
break;

0 commit comments

Comments
 (0)