summaryrefslogtreecommitdiff
path: root/cmds-check.c
diff options
context:
space:
mode:
authorZach Brown <zab@redhat.com>2013-08-14 16:16:34 -0700
committerDavid Sterba <dsterba@suse.cz>2013-09-03 19:41:02 +0200
commit19a2e1f4611eeff9668dacecafb6e51b5ca0f704 (patch)
treea6a821f87083f49c37f8307b454754436a8a4c2c /cmds-check.c
parent323bf8c5871f94b0623e98d575ccd79d19b14405 (diff)
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 <zab@redhat.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'cmds-check.c')
-rw-r--r--cmds-check.c7
1 files changed, 3 insertions, 4 deletions
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;