Skip to content

Commit 54c6cd0

Browse files
committed
fix compilation warning: warning: this statement may fall through
``` src/siphash24.c: In function ‘siphash24_compress’: src/siphash24.c:129:40: warning: this statement may fall through [-Wimplicit-fallthrough=] state->padding |= ((uint64_t) in[6]) << 48; ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ src/siphash24.c:130:17: note: here case 6: ^~~~ src/siphash24.c:131:40: warning: this statement may fall through [-Wimplicit-fallthrough=] state->padding |= ((uint64_t) in[5]) << 40; ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ src/siphash24.c:132:17: note: here case 5: ^~~~ src/siphash24.c:133:40: warning: this statement may fall through [-Wimplicit-fallthrough=] state->padding |= ((uint64_t) in[4]) << 32; ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ src/siphash24.c:134:17: note: here case 4: ^~~~ src/siphash24.c:135:40: warning: this statement may fall through [-Wimplicit-fallthrough=] state->padding |= ((uint64_t) in[3]) << 24; ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ src/siphash24.c:136:17: note: here case 3: ^~~~ src/siphash24.c:137:40: warning: this statement may fall through [-Wimplicit-fallthrough=] state->padding |= ((uint64_t) in[2]) << 16; ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ src/siphash24.c:138:17: note: here case 2: ^~~~ src/siphash24.c:139:40: warning: this statement may fall through [-Wimplicit-fallthrough=] state->padding |= ((uint64_t) in[1]) << 8; ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ src/siphash24.c:140:17: note: here case 1: ^~~~ ```
1 parent caea814 commit 54c6cd0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/siphash24.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,18 +127,25 @@ void siphash24_compress(const void *_in, size_t inlen, struct siphash *state) {
127127
switch (left) {
128128
case 7:
129129
state->padding |= ((uint64_t) in[6]) << 48;
130+
/* fall through */
130131
case 6:
131132
state->padding |= ((uint64_t) in[5]) << 40;
133+
/* fall through */
132134
case 5:
133135
state->padding |= ((uint64_t) in[4]) << 32;
136+
/* fall through */
134137
case 4:
135138
state->padding |= ((uint64_t) in[3]) << 24;
139+
/* fall through */
136140
case 3:
137141
state->padding |= ((uint64_t) in[2]) << 16;
142+
/* fall through */
138143
case 2:
139144
state->padding |= ((uint64_t) in[1]) << 8;
145+
/* fall through */
140146
case 1:
141147
state->padding |= ((uint64_t) in[0]);
148+
/* fall through */
142149
case 0:
143150
break;
144151
}

0 commit comments

Comments
 (0)