diff options
author | Petri Lehtinen <petri@digip.org> | 2017-08-19 21:09:32 +0300 |
---|---|---|
committer | Petri Lehtinen <petri@digip.org> | 2017-08-19 21:09:32 +0300 |
commit | 3e5405c39e63c33b5ca07c6b4f7bdd53e7846b4c (patch) | |
tree | 1faee0d1de9cf259f3f787007476a8f8aad823d6 /src/lookup3.h | |
parent | 93e8cd7d684a0cbb3b58a74bd259dc457722ef2b (diff) | |
download | jansson-3e5405c39e63c33b5ca07c6b4f7bdd53e7846b4c.zip jansson-3e5405c39e63c33b5ca07c6b4f7bdd53e7846b4c.tar.gz jansson-3e5405c39e63c33b5ca07c6b4f7bdd53e7846b4c.tar.bz2 |
Work around gcc's -Wimplicit-fallthrough
Diffstat (limited to 'src/lookup3.h')
-rw-r--r-- | src/lookup3.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/lookup3.h b/src/lookup3.h index 522a41a..2fe4c25 100644 --- a/src/lookup3.h +++ b/src/lookup3.h @@ -359,17 +359,17 @@ static uint32_t hashlittle(const void *key, size_t length, uint32_t initval) /*-------------------------------- last block: affect all 32 bits of (c) */ switch(length) /* all the case statements fall through */ { - case 12: c+=((uint32_t)k[11])<<24; - case 11: c+=((uint32_t)k[10])<<16; - case 10: c+=((uint32_t)k[9])<<8; - case 9 : c+=k[8]; - case 8 : b+=((uint32_t)k[7])<<24; - case 7 : b+=((uint32_t)k[6])<<16; - case 6 : b+=((uint32_t)k[5])<<8; - case 5 : b+=k[4]; - case 4 : a+=((uint32_t)k[3])<<24; - case 3 : a+=((uint32_t)k[2])<<16; - case 2 : a+=((uint32_t)k[1])<<8; + case 12: c+=((uint32_t)k[11])<<24; /* fall through */ + case 11: c+=((uint32_t)k[10])<<16; /* fall through */ + case 10: c+=((uint32_t)k[9])<<8; /* fall through */ + case 9 : c+=k[8]; /* fall through */ + case 8 : b+=((uint32_t)k[7])<<24; /* fall through */ + case 7 : b+=((uint32_t)k[6])<<16; /* fall through */ + case 6 : b+=((uint32_t)k[5])<<8; /* fall through */ + case 5 : b+=k[4]; /* fall through */ + case 4 : a+=((uint32_t)k[3])<<24; /* fall through */ + case 3 : a+=((uint32_t)k[2])<<16; /* fall through */ + case 2 : a+=((uint32_t)k[1])<<8; /* fall through */ case 1 : a+=k[0]; break; case 0 : return c; |