From f9dc0b61b4535462946e8ace43e24d149ef07f96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Thu, 28 Nov 2024 21:51:58 +0100 Subject: [PATCH] Add missing fallthrough attributes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian Göttsche --- src/common/c_jhash.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/common/c_jhash.h b/src/common/c_jhash.h index 1aae10a3bdd04..5663ab62d32ed 100644 --- a/src/common/c_jhash.h +++ b/src/common/c_jhash.h @@ -151,17 +151,17 @@ static inline uint32_t c_jhash(const uint8_t *k, uint32_t length, uint32_t initv c += length; /* all the case statements fall through */ switch(len) { - case 11: c+=((uint32_t)k[10]<<24); - case 10: c+=((uint32_t)k[9]<<16); - case 9 : c+=((uint32_t)k[8]<<8); + case 11: c+=((uint32_t)k[10]<<24); Q_FALLTHROUGH(); + case 10: c+=((uint32_t)k[9]<<16); Q_FALLTHROUGH(); + case 9 : c+=((uint32_t)k[8]<<8); Q_FALLTHROUGH(); /* the first byte of c is reserved for the length */ - case 8 : b+=((uint32_t)k[7]<<24); - case 7 : b+=((uint32_t)k[6]<<16); - case 6 : b+=((uint32_t)k[5]<<8); - case 5 : b+=k[4]; - case 4 : a+=((uint32_t)k[3]<<24); - case 3 : a+=((uint32_t)k[2]<<16); - case 2 : a+=((uint32_t)k[1]<<8); + case 8 : b+=((uint32_t)k[7]<<24); Q_FALLTHROUGH(); + case 7 : b+=((uint32_t)k[6]<<16); Q_FALLTHROUGH(); + case 6 : b+=((uint32_t)k[5]<<8); Q_FALLTHROUGH(); + case 5 : b+=k[4]; Q_FALLTHROUGH(); + case 4 : a+=((uint32_t)k[3]<<24); Q_FALLTHROUGH(); + case 3 : a+=((uint32_t)k[2]<<16); Q_FALLTHROUGH(); + case 2 : a+=((uint32_t)k[1]<<8); Q_FALLTHROUGH(); case 1 : a+=k[0]; /* case 0: nothing left to add */ }