Merge branch 'fix_filename_overrun' of https://github.com/sitsofe/fio
[fio.git] / hash.h
diff --git a/hash.h b/hash.h
index 66dd3d6916ea5b1386948c2d2a661d8bce59abf9..2c04bc296974dbe7708fe2ef940afd5893a92ec0 100644 (file)
--- a/hash.h
+++ b/hash.h
@@ -3,6 +3,7 @@
 
 #include <inttypes.h>
 #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;   fallthrough;
+       case 11: c += (uint32_t) k[10] << 16;   fallthrough;
+       case 10: c += (uint32_t) k[9] << 8;     fallthrough;
+       case 9:  c += k[8];                     fallthrough;
+       case 8:  b += (uint32_t) k[7] << 24;    fallthrough;
+       case 7:  b += (uint32_t) k[6] << 16;    fallthrough;
+       case 6:  b += (uint32_t) k[5] << 8;     fallthrough;
+       case 5:  b += k[4];                     fallthrough;
+       case 4:  a += (uint32_t) k[3] << 24;    fallthrough;
+       case 3:  a += (uint32_t) k[2] << 16;    fallthrough;
+       case 2:  a += (uint32_t) k[1] << 8;     fallthrough;
        case 1:  a += k[0];
                 __jhash_final(a, b, c);
+                fallthrough;
        case 0: /* Nothing left to add */
                break;
        }