Skip to content

Commit

Permalink
btrfs: scrub: silence an uninitialized variable warning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and David Sterba committed Mar 11, 2016
1 parent ebb8765 commit 07c9a8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/scrub.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ static void scrub_print_warning(const char *errstr, struct scrub_block *sblock)
u64 flags = 0;
u64 ref_root;
u32 item_size;
u8 ref_level;
u8 ref_level = 0;
int ret;

WARN_ON(sblock->page_count < 1);
Expand Down

0 comments on commit 07c9a8e

Please sign in to comment.