Skip to content

Commit 07c9a8e

Browse files
Dan Carpenterkdave
authored andcommitted
btrfs: scrub: silence an uninitialized variable warning
It's basically harmless if "ref_level" isn't initialized since it's only used for an error message, but it causes a static checker warning. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent ebb8765 commit 07c9a8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/btrfs/scrub.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ static void scrub_print_warning(const char *errstr, struct scrub_block *sblock)
611611
u64 flags = 0;
612612
u64 ref_root;
613613
u32 item_size;
614-
u8 ref_level;
614+
u8 ref_level = 0;
615615
int ret;
616616

617617
WARN_ON(sblock->page_count < 1);

0 commit comments

Comments
 (0)