Merge pull request #728 from antmak/fix_fallthrou_warnings

Fix warnings in GCC7 related to -Wimplicit-fallthrough
This commit is contained in:
Frank Denis 2018-07-04 21:18:32 +02:00 committed by GitHub
commit 875fbd0e91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -33,16 +33,22 @@ crypto_shorthash_siphash24(unsigned char *out, const unsigned char *in,
switch (left) {
case 7:
b |= ((uint64_t) in[6]) << 48;
/* FALLTHRU */
case 6:
b |= ((uint64_t) in[5]) << 40;
/* FALLTHRU */
case 5:
b |= ((uint64_t) in[4]) << 32;
/* FALLTHRU */
case 4:
b |= ((uint64_t) in[3]) << 24;
/* FALLTHRU */
case 3:
b |= ((uint64_t) in[2]) << 16;
/* FALLTHRU */
case 2:
b |= ((uint64_t) in[1]) << 8;
/* FALLTHRU */
case 1:
b |= ((uint64_t) in[0]);
break;

View File

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