diff options
author | Eric Sandeen <sandeen@redhat.com> | 2011-09-16 15:49:23 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-09-16 18:43:05 -0400 |
commit | 9e30fb23ef85d6b2a58527048cc9208405a38299 (patch) | |
tree | 3ec1505fde4f55189e5b6f6304d590d8a7f3b1c0 /lib/ext2fs | |
parent | da05d1413090b6aa8f728423db3279a0d5d0ce14 (diff) | |
download | e2fsprogs-9e30fb23ef85d6b2a58527048cc9208405a38299.tar.gz |
e2fsprogs: annotate intentional fallthroughs in case statements
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>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'lib/ext2fs')
-rw-r--r-- | lib/ext2fs/dirhash.c | 3 | ||||
-rw-r--r-- | lib/ext2fs/extent.c | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/ext2fs/dirhash.c b/lib/ext2fs/dirhash.c index a0697069..5477bfbc 100644 --- a/lib/ext2fs/dirhash.c +++ b/lib/ext2fs/dirhash.c @@ -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) { diff --git a/lib/ext2fs/extent.c b/lib/ext2fs/extent.c index abb60dde..6d2afb0f 100644 --- a/lib/ext2fs/extent.c +++ b/lib/ext2fs/extent.c @@ -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; |