X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=hash.h;h=f7596a56367572b2852d049144103979ead08eea;hb=7ddc4ed1ce94639e3306f980a7c651da3dd81c1d;hp=66dd3d6916ea5b1386948c2d2a661d8bce59abf9;hpb=2401022342f650ac7d845a14c7b9bf1cd87cead6;p=fio.git diff --git a/hash.h b/hash.h index 66dd3d69..f7596a56 100644 --- a/hash.h +++ b/hash.h @@ -3,6 +3,7 @@ #include #include "arch/arch.h" +#include "compiler/compiler.h" /* Fast hashing routine for a long. (C) 2002 William Lee Irwin III, IBM */ @@ -141,19 +142,20 @@ static inline uint32_t jhash(const void *key, uint32_t length, uint32_t initval) /* Last block: affect all 32 bits of (c) */ /* All the case statements fall through */ switch (length) { - 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 12: c += (uint32_t) k[11] << 24; fio_fallthrough; + case 11: c += (uint32_t) k[10] << 16; fio_fallthrough; + case 10: c += (uint32_t) k[9] << 8; fio_fallthrough; + case 9: c += k[8]; fio_fallthrough; + case 8: b += (uint32_t) k[7] << 24; fio_fallthrough; + case 7: b += (uint32_t) k[6] << 16; fio_fallthrough; + case 6: b += (uint32_t) k[5] << 8; fio_fallthrough; + case 5: b += k[4]; fio_fallthrough; + case 4: a += (uint32_t) k[3] << 24; fio_fallthrough; + case 3: a += (uint32_t) k[2] << 16; fio_fallthrough; + case 2: a += (uint32_t) k[1] << 8; fio_fallthrough; case 1: a += k[0]; __jhash_final(a, b, c); + fio_fallthrough; case 0: /* Nothing left to add */ break; }