fix: mute default fallthrough warning
This commit is contained in:
parent
ef760ca01a
commit
38f8b8e7d6
1 changed files with 5 additions and 4 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
|
||||
/* 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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue