Skip to content

Commit 02cfe77

Browse files
geertukdave
authored andcommitted
btrfs: ref-verify: Remove unused parameter from walk_up_tree() to kill warning
With gcc-4.1.2: fs/btrfs/ref-verify.c: In function ‘btrfs_build_ref_tree’: fs/btrfs/ref-verify.c:1017: warning: ‘root’ is used uninitialized in this function The variable is indeed passed uninitialized, but it is never used by the callee. However, not all versions of gcc are smart enough to notice. Hence remove the unused parameter from walk_up_tree() to silence the compiler warning. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 6af49db commit 02cfe77

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎fs/btrfs/ref-verify.c‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -606,8 +606,7 @@ static int walk_down_tree(struct btrfs_root *root, struct btrfs_path *path,
606606
}
607607

608608
/* Walk up to the next node that needs to be processed */
609-
static int walk_up_tree(struct btrfs_root *root, struct btrfs_path *path,
610-
int *level)
609+
static int walk_up_tree(struct btrfs_path *path, int *level)
611610
{
612611
int l;
613612

@@ -984,7 +983,6 @@ void btrfs_free_ref_tree_range(struct btrfs_fs_info *fs_info, u64 start,
984983
int btrfs_build_ref_tree(struct btrfs_fs_info *fs_info)
985984
{
986985
struct btrfs_path *path;
987-
struct btrfs_root *root;
988986
struct extent_buffer *eb;
989987
u64 bytenr = 0, num_bytes = 0;
990988
int ret, level;
@@ -1014,7 +1012,7 @@ int btrfs_build_ref_tree(struct btrfs_fs_info *fs_info)
10141012
&bytenr, &num_bytes);
10151013
if (ret)
10161014
break;
1017-
ret = walk_up_tree(root, path, &level);
1015+
ret = walk_up_tree(path, &level);
10181016
if (ret < 0)
10191017
break;
10201018
if (ret > 0) {

0 commit comments

Comments
 (0)