@@ -307,6 +307,7 @@ int e2p_edit_feature2(const char *str, __u32 *compat_array, __u32 *ok_array,
case '-':
case '^':
neg++;
+ /* fallthrough */
case '+':
cp++;
break;
@@ -122,6 +122,7 @@ int e2p_edit_mntopts(const char *str, __u32 *mntopts, __u32 ok)
case '-':
case '^':
neg++;
+ /* fallthrough */
case '+':
cp++;
break;
@@ -26,10 +26,13 @@ unsigned long long parse_num_blocks2(const char *arg, int log_block_size)
switch (*p) { /* Using fall-through logic */
case 'T': case 't':
num <<= 10;
+ /* fallthrough */
case 'G': case 'g':
num <<= 10;
+ /* fallthrough */
case 'M': case 'm':
num <<= 10;
+ /* fallthrough */
case 'K': case 'k':
num >>= log_block_size;
break;
@@ -217,11 +217,13 @@ errcode_t ext2fs_dirhash(int version, const char *name, int len,
switch (version) {
case EXT2_HASH_LEGACY_UNSIGNED:
unsigned_flag++;
+ /* fallthrough */
case EXT2_HASH_LEGACY:
hash = dx_hack_hash(name, len, unsigned_flag);
break;
case EXT2_HASH_HALF_MD4_UNSIGNED:
unsigned_flag++;
+ /* fallthrough */
case EXT2_HASH_HALF_MD4:
p = name;
while (len > 0) {
@@ -235,6 +237,7 @@ errcode_t ext2fs_dirhash(int version, const char *name, int len,
break;
case EXT2_HASH_TEA_UNSIGNED:
unsigned_flag++;
+ /* fallthrough */
case EXT2_HASH_TEA:
p = name;
while (len > 0) {
@@ -373,9 +373,11 @@ retry:
case EXT2_EXTENT_ROOT:
handle->level = 0;
path = handle->path + handle->level;
+ /* fallthrough */
case EXT2_EXTENT_FIRST_SIB:
path->left = path->entries;
path->curr = 0;
+ /* fallthrough */
case EXT2_EXTENT_NEXT_SIB:
if (path->left <= 0)
return EXT2_ET_EXTENT_NO_NEXT;
Using the /* fallthrough */ comment lets Coverity (and humans) know that we really do want to fall through in these case statements. Signed-off-by: Eric Sandeen <sandeen@redhat.com> --- lib/e2p/feature.c | 1 + lib/e2p/mntopts.c | 1 + lib/e2p/parse_num.c | 3 +++ lib/ext2fs/dirhash.c | 3 +++ lib/ext2fs/extent.c | 2 ++ 5 files changed, 10 insertions(+), 0 deletions(-)