summaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-03-11 09:08:56 +0100
committerDavid Sterba <dsterba@suse.com>2016-03-11 17:21:59 +0100
commit07c9a8e07771fce74620aa4f8132537196b8e43a (patch)
tree4228f559b561838d6319717c74de7fa7d29f2729 /fs/btrfs
parentbtrfs: move btrfs_compression_type to compression.h (diff)
downloadlinux-07c9a8e07771fce74620aa4f8132537196b8e43a.tar.xz
linux-07c9a8e07771fce74620aa4f8132537196b8e43a.zip
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>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/scrub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index e42aa27c96e9..39dbdcbf4d13 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -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);