]> 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)
commit207d36355fd7b455cd1080d0f8b06cd49e5827a7
tree17f2f4dc6d1e1300a1c6088878116728bda9b19d
parent9d7cf598d958e078017f7740ec11b084804da5a4
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