Btrfs: Fix variables set but not read (bugs found by gcc 4.6)
These are all the cases where a variable is set, but not read which are really bugs. - Couple of incorrect error handling fixed. - One incorrect use of a allocation policy - Some other things Still needs more review. Found by gcc 4.6's new warnings. [akpm@linux-foundation.org: fix build. Might have been bitrot] Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: Chris Mason <chris.mason@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
@ -1389,7 +1389,7 @@ int btrfs_merge_bio_hook(struct page *page, unsigned long offset,
|
||||
|
||||
if (map_length < length + size)
|
||||
return 1;
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -2709,8 +2709,8 @@ static int check_path_shared(struct btrfs_root *root,
|
||||
{
|
||||
struct extent_buffer *eb;
|
||||
int level;
|
||||
int ret;
|
||||
u64 refs = 1;
|
||||
int uninitialized_var(ret);
|
||||
|
||||
for (level = 0; level < BTRFS_MAX_LEVEL; level++) {
|
||||
if (!path->nodes[level])
|
||||
@ -2723,7 +2723,7 @@ static int check_path_shared(struct btrfs_root *root,
|
||||
if (refs > 1)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
return ret; /* XXX callers? */
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user