#define FIELD_SIZE(s, f) (sizeof(((__typeof__(s))0)->f))
#endif
+#ifndef __has_attribute
+#define __GCC4_has_attribute___fallthrough__ 0
+#endif
+
+#if __has_attribute(__fallthrough__)
+#define fallthrough __attribute__((__fallthrough__))
+#else
+#define fallthrough do {} while (0) /* fallthrough */
+#endif
+
#endif
#include "murmur3.h"
+#include "../compiler/compiler.h"
static inline uint32_t rotl32(uint32_t x, int8_t r)
{
switch (len & 3) {
case 3:
k1 ^= tail[2] << 16;
- /* fall through */
+ fallthrough;
case 2:
k1 ^= tail[1] << 8;
- /* fall through */
+ fallthrough;
case 1:
k1 ^= tail[0];
k1 *= c1;
#include <inttypes.h>
#include "arch/arch.h"
+#include "compiler/compiler.h"
/* Fast hashing routine for a long.
(C) 2002 William Lee Irwin III, IBM */
/* 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;
}
log_err("%s: unrecognized option '%s'\n", argv[0],
argv[optind - 1]);
show_closest_option(argv[optind - 1]);
- /* fall through */
+ fallthrough;
default:
do_exit++;
exit_val = 1;
break;
case 1 ... 4:
idx = 1;
+ fallthrough;
case 0:
break;
}
break;
case 2 ... 3:
idx = 1;
+ fallthrough;
case 1:
break;
}
break;
case 2 ... 3:
idx = 1;
+ fallthrough;
case 0 ... 1:
break;
}
break;
case 2 ... 3:
idx = 1;
+ fallthrough;
case 0 ... 1:
break;
}
break;
case 2 ... 3:
idx = 1;
+ fallthrough;
case 0 ... 1:
break;
}
*/
switch (spin) {
case 15: __LFSR_NEXT(fl, fl->last_val);
- /* fall through */
+ fallthrough;
case 14: __LFSR_NEXT(fl, fl->last_val);
- /* fall through */
+ fallthrough;
case 13: __LFSR_NEXT(fl, fl->last_val);
- /* fall through */
+ fallthrough;
case 12: __LFSR_NEXT(fl, fl->last_val);
- /* fall through */
+ fallthrough;
case 11: __LFSR_NEXT(fl, fl->last_val);
- /* fall through */
+ fallthrough;
case 10: __LFSR_NEXT(fl, fl->last_val);
- /* fall through */
+ fallthrough;
case 9: __LFSR_NEXT(fl, fl->last_val);
- /* fall through */
+ fallthrough;
case 8: __LFSR_NEXT(fl, fl->last_val);
- /* fall through */
+ fallthrough;
case 7: __LFSR_NEXT(fl, fl->last_val);
- /* fall through */
+ fallthrough;
case 6: __LFSR_NEXT(fl, fl->last_val);
- /* fall through */
+ fallthrough;
case 5: __LFSR_NEXT(fl, fl->last_val);
- /* fall through */
+ fallthrough;
case 4: __LFSR_NEXT(fl, fl->last_val);
- /* fall through */
+ fallthrough;
case 3: __LFSR_NEXT(fl, fl->last_val);
- /* fall through */
+ fallthrough;
case 2: __LFSR_NEXT(fl, fl->last_val);
- /* fall through */
+ fallthrough;
case 1: __LFSR_NEXT(fl, fl->last_val);
- /* fall through */
+ fallthrough;
case 0: __LFSR_NEXT(fl, fl->last_val);
- /* fall through */
+ fallthrough;
default: break;
}
}
}
case FIO_OPT_STR_VAL_TIME:
is_time = 1;
- /* fall through */
+ fallthrough;
case FIO_OPT_ULL:
case FIO_OPT_INT:
case FIO_OPT_STR_VAL: {
}
case FIO_OPT_DEPRECATED:
ret = 1;
- /* fall through */
+ fallthrough;
case FIO_OPT_SOFT_DEPRECATED:
log_info("Option %s is deprecated\n", o->name);
break;
#include "../lib/lfsr.h"
#include "../gettime.h"
#include "../fio_time.h"
+#include "../compiler/compiler.h"
static void usage(void)
{
switch (argc) {
case 5: if (strncmp(argv[4], "verify", 7) == 0)
verify = 1;
- /* fall through */
+ fallthrough;
case 4: spin = atoi(argv[3]);
- /* fall through */
+ fallthrough;
case 3: seed = atol(argv[2]);
- /* fall through */
+ fallthrough;
case 2: numbers = strtol(argv[1], NULL, 16);
break;
default: usage();