mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
btrfs: scrub: initialize ret in scrub_simple_mirror() to fix compilation warning
[ Upstream commit b4e585fffc1cf877112ed231a91f089e85688c2a ] The following error message is displayed: ../fs/btrfs/scrub.c:2152:9: error: ‘ret’ may be used uninitialized in this function [-Werror=maybe-uninitialized]" Compiler version: gcc version: (Debian 10.2.1-6) 10.2.1 20210110 Reviewed-by: Boris Burkov <boris@bur.io> Signed-off-by: Lu Yao <yaolu@kylinos.cn> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
90a01aefb8
commit
e130d4fc19
1 changed files with 1 additions and 1 deletions
|
@ -2020,7 +2020,7 @@ static int scrub_simple_mirror(struct scrub_ctx *sctx,
|
||||||
struct btrfs_fs_info *fs_info = sctx->fs_info;
|
struct btrfs_fs_info *fs_info = sctx->fs_info;
|
||||||
const u64 logical_end = logical_start + logical_length;
|
const u64 logical_end = logical_start + logical_length;
|
||||||
u64 cur_logical = logical_start;
|
u64 cur_logical = logical_start;
|
||||||
int ret;
|
int ret = 0;
|
||||||
|
|
||||||
/* The range must be inside the bg */
|
/* The range must be inside the bg */
|
||||||
ASSERT(logical_start >= bg->start && logical_end <= bg->start + bg->length);
|
ASSERT(logical_start >= bg->start && logical_end <= bg->start + bg->length);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue