From 19a2e1f4611eeff9668dacecafb6e51b5ca0f704 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 14 Aug 2013 16:16:34 -0700 Subject: btrfs-progs: fix shadow symbols This fixes all the instances of warnings that symbols declared in blocks shadow symbols with the same name in surrounding scopes: cmds-device.c:341:22: warning: symbol 'path' shadows an earlier one cmds-device.c:285:14: originally declared here I just renamed or removed the risky shadow symbols instead of pulling their blocks out into functions. Signed-off-by: Zach Brown Signed-off-by: David Sterba Signed-off-by: Chris Mason --- cmds-check.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'cmds-check.c') diff --git a/cmds-check.c b/cmds-check.c index 4e5f997d..2318aed5 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -3477,6 +3477,7 @@ static int run_next_block(struct btrfs_root *root, u64 parent; u64 owner; u64 flags; + u64 ptr; int ret; int i; int nritems; @@ -3665,8 +3666,8 @@ static int run_next_block(struct btrfs_root *root, btrfs_item_key_to_cpu(buf, &first_key, 0); level = btrfs_header_level(buf); for (i = 0; i < nritems; i++) { - u64 ptr = btrfs_node_blockptr(buf, i); - u32 size = btrfs_level_size(root, level - 1); + ptr = btrfs_node_blockptr(buf, i); + size = btrfs_level_size(root, level - 1); btrfs_node_key_to_cpu(buf, &key, i); ret = add_extent_rec(extent_cache, &key, ptr, size, 0, 0, 1, 0, 1, 0, @@ -5317,8 +5318,6 @@ again: ret = err; if (trans) { - int err; - err = btrfs_commit_transaction(trans, root); if (!ret) ret = err; -- cgit v1.2.3