diff --git a/src/util/xxhash.h b/src/util/xxhash.h index f7a4b40578e..eb9e86597db 100644 --- a/src/util/xxhash.h +++ b/src/util/xxhash.h @@ -78,6 +78,8 @@ XXH32 6.8 GB/s 6.0 GB/s #define XXH_FORCE_ALIGN_CHECK 0 #define XXH_FORCE_MEMORY_ACCESS 0 +#include "util/compiler.h" /* for FALLTHROUGH */ + #if defined (__cplusplus) extern "C" { #endif @@ -729,41 +731,41 @@ XXH32_finalize(xxh_u32 h32, const xxh_u8* ptr, size_t len, XXH_alignment align) } else { switch(len&15) /* or switch(bEnd - p) */ { case 12: PROCESS4; - /* fallthrough */ + FALLTHROUGH; case 8: PROCESS4; - /* fallthrough */ + FALLTHROUGH; case 4: PROCESS4; return XXH32_avalanche(h32); case 13: PROCESS4; - /* fallthrough */ + FALLTHROUGH; case 9: PROCESS4; - /* fallthrough */ + FALLTHROUGH; case 5: PROCESS4; PROCESS1; return XXH32_avalanche(h32); case 14: PROCESS4; - /* fallthrough */ + FALLTHROUGH; case 10: PROCESS4; - /* fallthrough */ + FALLTHROUGH; case 6: PROCESS4; PROCESS1; PROCESS1; return XXH32_avalanche(h32); case 15: PROCESS4; - /* fallthrough */ + FALLTHROUGH; case 11: PROCESS4; - /* fallthrough */ + FALLTHROUGH; case 7: PROCESS4; - /* fallthrough */ + FALLTHROUGH; case 3: PROCESS1; - /* fallthrough */ + FALLTHROUGH; case 2: PROCESS1; - /* fallthrough */ + FALLTHROUGH; case 1: PROCESS1; - /* fallthrough */ + FALLTHROUGH; case 0: return XXH32_avalanche(h32); } XXH_ASSERT(0); @@ -1144,63 +1146,63 @@ XXH64_finalize(xxh_u64 h64, const xxh_u8* ptr, size_t len, XXH_alignment align) } else { switch(len & 31) { case 24: PROCESS8_64; - /* fallthrough */ + FALLTHROUGH; case 16: PROCESS8_64; - /* fallthrough */ + FALLTHROUGH; case 8: PROCESS8_64; return XXH64_avalanche(h64); case 28: PROCESS8_64; - /* fallthrough */ + FALLTHROUGH; case 20: PROCESS8_64; - /* fallthrough */ + FALLTHROUGH; case 12: PROCESS8_64; - /* fallthrough */ + FALLTHROUGH; case 4: PROCESS4_64; return XXH64_avalanche(h64); case 25: PROCESS8_64; - /* fallthrough */ + FALLTHROUGH; case 17: PROCESS8_64; - /* fallthrough */ + FALLTHROUGH; case 9: PROCESS8_64; PROCESS1_64; return XXH64_avalanche(h64); case 29: PROCESS8_64; - /* fallthrough */ + FALLTHROUGH; case 21: PROCESS8_64; - /* fallthrough */ + FALLTHROUGH; case 13: PROCESS8_64; - /* fallthrough */ + FALLTHROUGH; case 5: PROCESS4_64; PROCESS1_64; return XXH64_avalanche(h64); case 26: PROCESS8_64; - /* fallthrough */ + FALLTHROUGH; case 18: PROCESS8_64; - /* fallthrough */ + FALLTHROUGH; case 10: PROCESS8_64; PROCESS1_64; PROCESS1_64; return XXH64_avalanche(h64); case 30: PROCESS8_64; - /* fallthrough */ + FALLTHROUGH; case 22: PROCESS8_64; - /* fallthrough */ + FALLTHROUGH; case 14: PROCESS8_64; - /* fallthrough */ + FALLTHROUGH; case 6: PROCESS4_64; PROCESS1_64; PROCESS1_64; return XXH64_avalanche(h64); case 27: PROCESS8_64; - /* fallthrough */ + FALLTHROUGH; case 19: PROCESS8_64; - /* fallthrough */ + FALLTHROUGH; case 11: PROCESS8_64; PROCESS1_64; PROCESS1_64; @@ -1208,19 +1210,19 @@ XXH64_finalize(xxh_u64 h64, const xxh_u8* ptr, size_t len, XXH_alignment align) return XXH64_avalanche(h64); case 31: PROCESS8_64; - /* fallthrough */ + FALLTHROUGH; case 23: PROCESS8_64; - /* fallthrough */ + FALLTHROUGH; case 15: PROCESS8_64; - /* fallthrough */ + FALLTHROUGH; case 7: PROCESS4_64; - /* fallthrough */ + FALLTHROUGH; case 3: PROCESS1_64; - /* fallthrough */ + FALLTHROUGH; case 2: PROCESS1_64; - /* fallthrough */ + FALLTHROUGH; case 1: PROCESS1_64; - /* fallthrough */ + FALLTHROUGH; case 0: return XXH64_avalanche(h64); } }