summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeremy Sowden <jeremy@azazel.net>2021-11-30 10:55:29 +0000
committerPablo Neira Ayuso <pablo@netfilter.org>2021-11-30 20:55:17 +0100
commitd76c39b996703f6b0192225b277ce0c5ac79dca4 (patch)
tree2dc66dee4d7977629ba8040e366421b5cc37d270 /include
parenta8cedca43c63370ce400709fb81c34d7ece91bfb (diff)
jhash: add "fall through" comments to switch cases
gcc warns about undocumented fall-throughs in switches. In this case, the fall-throughs are intended, so add commnts to indicate this to the compiler. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r--include/ulogd/jhash.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/include/ulogd/jhash.h b/include/ulogd/jhash.h
index 38b8780..e5ca287 100644
--- a/include/ulogd/jhash.h
+++ b/include/ulogd/jhash.h
@@ -66,18 +66,18 @@ static inline u32 jhash(const void *key, u32 length, u32 initval)
c += length;
switch (len) {
- case 11: c += ((u32)k[10]<<24);
- case 10: c += ((u32)k[9]<<16);
- case 9 : c += ((u32)k[8]<<8);
- case 8 : b += ((u32)k[7]<<24);
- case 7 : b += ((u32)k[6]<<16);
- case 6 : b += ((u32)k[5]<<8);
- case 5 : b += k[4];
- case 4 : a += ((u32)k[3]<<24);
- case 3 : a += ((u32)k[2]<<16);
- case 2 : a += ((u32)k[1]<<8);
- case 1 : a += k[0];
- };
+ case 11: c += ((u32)k[10]<<24); // fall through
+ case 10: c += ((u32)k[9]<<16); // fall through
+ case 9 : c += ((u32)k[8]<<8); // fall through
+ case 8 : b += ((u32)k[7]<<24); // fall through
+ case 7 : b += ((u32)k[6]<<16); // fall through
+ case 6 : b += ((u32)k[5]<<8); // fall through
+ case 5 : b += k[4]; // fall through
+ case 4 : a += ((u32)k[3]<<24); // fall through
+ case 3 : a += ((u32)k[2]<<16); // fall through
+ case 2 : a += ((u32)k[1]<<8); // fall through
+ case 1 : a += k[0]; // fall through
+ }
__jhash_mix(a,b,c);