]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Turn an 'else if' into an 'else' in btrfs_uuid_tree_add
authorNathan Chancellor <natechancellor@gmail.com>
Thu, 7 Mar 2019 16:35:15 +0000 (09:35 -0700)
committerDavid Sterba <dsterba@suse.com>
Mon, 29 Apr 2019 17:02:19 +0000 (19:02 +0200)
commit8f55e37c718fb77fb76257e31fe83ac0a6cb4ed5
tree17f2f4dc6d1e1300a1c6088878116728bda9b19d
parent951cd6b906dd92b4737bba1feb94d069f4f01c55
btrfs: Turn an 'else if' into an 'else' in btrfs_uuid_tree_add

When building with -Wsometimes-uninitialized, Clang warns:

fs/btrfs/uuid-tree.c:129:13: warning: variable 'eb' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
fs/btrfs/uuid-tree.c:129:13: warning: variable 'offset' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]

Clang can't tell that all cases are covered with this final else if.
Just turn it into an else so that it is clear.

Link: https://github.com/ClangBuiltLinux/linux/issues/385
Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/uuid-tree.c