diff options
author | Sudip Mukherjee <sudipm.mukherjee@gmail.com> | 2016-02-16 13:32:47 +0530 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-02-18 11:46:03 +0100 |
commit | 89771cc98c5a4e8666e479dde171ffb52c6fa774 (patch) | |
tree | 2011e3fb83bd97773154c96c0718ee87e213ecc7 /fs/btrfs/extent-tree.c | |
parent | 47dc196ae719c197b961c09d72d1b5ab90c66dc5 (diff) | |
download | op-kernel-dev-89771cc98c5a4e8666e479dde171ffb52c6fa774.zip op-kernel-dev-89771cc98c5a4e8666e479dde171ffb52c6fa774.tar.gz |
btrfs: fix build warning
We were getting build warning about:
fs/btrfs/extent-tree.c:7021:34: warning: ‘used_bg’ may be used
uninitialized in this function
It is not a valid warning as used_bg is never used uninitilized since
locked is initially false so we can never be in the section where
'used_bg' is used. But gcc is not able to understand that and we can
initialize it while declaring to silence the warning.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index e2287c7..f24e4c3 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -7018,7 +7018,7 @@ btrfs_lock_cluster(struct btrfs_block_group_cache *block_group, struct btrfs_free_cluster *cluster, int delalloc) { - struct btrfs_block_group_cache *used_bg; + struct btrfs_block_group_cache *used_bg = NULL; bool locked = false; again: spin_lock(&cluster->refill_lock); |