summaryrefslogtreecommitdiff
path: root/cmds-check.c
diff options
context:
space:
mode:
authorGoldwyn Rodrigues <rgoldwyn@suse.com>2016-12-01 11:28:20 -0600
committerDavid Sterba <dsterba@suse.com>2016-12-14 15:06:35 +0100
commit11315213aa88b147348d936cff6d1038e4b20c0d (patch)
treeca5a16746580a70d5a69db3ad219cff31ae35746 /cmds-check.c
parent617af9e92e0c4cb6c15c5f3d5d9cb194c303c4b6 (diff)
btrfs-progs: Initialize ret to suppress compiler warning
The path that leaves ret unintialized goes through the second if block and requires dback->found_ref to be 0. Quick search leads to several places where it's set according to found items so we won't reach the for loop with found_ref 0. Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com> [ updated changelog ] Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'cmds-check.c')
-rw-r--r--cmds-check.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds-check.c b/cmds-check.c
index 64fdc0dd..34209b0a 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -8041,7 +8041,7 @@ static int record_extent(struct btrfs_trans_handle *trans,
struct extent_backref *back,
int allocated, u64 flags)
{
- int ret;
+ int ret = 0;
struct btrfs_root *extent_root = info->extent_root;
struct extent_buffer *leaf;
struct btrfs_key ins_key;