]> asedeno.scripts.mit.edu Git - linux.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)
commite8baf7abcf56da68a03df77f51459acddeef4195
tree17f2f4dc6d1e1300a1c6088878116728bda9b19d
parent262c96a3c3670bf2322b9a0c9d74e2a3d9e43be0
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