summaryrefslogtreecommitdiff
path: root/fs/btrfs/ref-verify.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2017-11-15 16:04:40 +0100
committerDavid Sterba <dsterba@suse.com>2018-01-22 16:08:13 +0100
commit02cfe779ccaec421cd4ed53a574c8a6354efa7fe (patch)
tree264eb12934ac3774ce6e5092c390766e2426ecbb /fs/btrfs/ref-verify.c
parent6af49dbde9532c95f53d2c45fe9cc0012226c5e7 (diff)
downloadlwn-02cfe779ccaec421cd4ed53a574c8a6354efa7fe.tar.gz
lwn-02cfe779ccaec421cd4ed53a574c8a6354efa7fe.zip
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>
Diffstat (limited to 'fs/btrfs/ref-verify.c')
-rw-r--r--fs/btrfs/ref-verify.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/ref-verify.c b/fs/btrfs/ref-verify.c
index 34878699d363..171f3cce30e6 100644
--- a/fs/btrfs/ref-verify.c
+++ b/fs/btrfs/ref-verify.c
@@ -606,8 +606,7 @@ static int walk_down_tree(struct btrfs_root *root, struct btrfs_path *path,
}
/* Walk up to the next node that needs to be processed */
-static int walk_up_tree(struct btrfs_root *root, struct btrfs_path *path,
- int *level)
+static int walk_up_tree(struct btrfs_path *path, int *level)
{
int l;
@@ -984,7 +983,6 @@ void btrfs_free_ref_tree_range(struct btrfs_fs_info *fs_info, u64 start,
int btrfs_build_ref_tree(struct btrfs_fs_info *fs_info)
{
struct btrfs_path *path;
- struct btrfs_root *root;
struct extent_buffer *eb;
u64 bytenr = 0, num_bytes = 0;
int ret, level;
@@ -1014,7 +1012,7 @@ int btrfs_build_ref_tree(struct btrfs_fs_info *fs_info)
&bytenr, &num_bytes);
if (ret)
break;
- ret = walk_up_tree(root, path, &level);
+ ret = walk_up_tree(path, &level);
if (ret < 0)
break;
if (ret > 0) {