From 38f8b8e7d6daff62ce4e11a476c9500125ffccf0 Mon Sep 17 00:00:00 2001 From: lohhiiccc <96543753+lohhiiccc@users.noreply.github.com> Date: Mon, 2 Mar 2026 10:09:04 +0100 Subject: [PATCH] fix: mute default fallthrough warning --- src/utils/checksum.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/utils/checksum.c b/src/utils/checksum.c index da5c8df..0b325f3 100644 --- a/src/utils/checksum.c +++ b/src/utils/checksum.c @@ -1,6 +1,7 @@ #include #include + /* Forward Declarations */ static inline uint16_t read_be16(const uint8_t *ptr); static uint32_t sum_words(const uint8_t *data, size_t len); @@ -32,10 +33,10 @@ sum_words(const uint8_t *data, size_t len) { size_t n = (words + 3) >> 2; switch (words & 3) { - case 0: do { sum += read_be16(ptr); ptr += 2; - case 3: sum += read_be16(ptr); ptr += 2; - case 2: sum += read_be16(ptr); ptr += 2; - case 1: sum += read_be16(ptr); ptr += 2; + case 0: do { sum += read_be16(ptr); ptr += 2; /* fall through */ + case 3: sum += read_be16(ptr); ptr += 2; /* fall through */ + case 2: sum += read_be16(ptr); ptr += 2; /* fall through */ + case 1: sum += read_be16(ptr); ptr += 2; /* fall through */ } while (--n > 0); } }