btrfs: scrub: silence an uninitialized variable warning
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 11 Mar 2016 08:08:56 +0000 (11:08 +0300)
committerDavid Sterba <dsterba@suse.com>
Fri, 11 Mar 2016 16:21:59 +0000 (17:21 +0100)
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>
fs/btrfs/scrub.c

index e42aa27c96e9f58c4e4e81fd6f78d99e39238474..39dbdcbf4d134b6104328cbbdfbc98289b68bdfe 100644 (file)
@@ -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);