diff options
author | Zach Brown <zab@redhat.com> | 2013-08-14 16:16:34 -0700 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2013-09-03 19:41:02 +0200 |
commit | 19a2e1f4611eeff9668dacecafb6e51b5ca0f704 (patch) | |
tree | a6a821f87083f49c37f8307b454754436a8a4c2c /cmds-restore.c | |
parent | 323bf8c5871f94b0623e98d575ccd79d19b14405 (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-restore.c')
-rw-r--r-- | cmds-restore.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmds-restore.c b/cmds-restore.c index 478c0b5c..1e965a69 100644 --- a/cmds-restore.c +++ b/cmds-restore.c @@ -658,7 +658,7 @@ set_size: } static int search_dir(struct btrfs_root *root, struct btrfs_key *key, - const char *output_rootdir, const char *dir, + const char *output_rootdir, const char *in_dir, const regex_t *mreg) { struct btrfs_path *path; @@ -716,7 +716,7 @@ static int search_dir(struct btrfs_root *root, struct btrfs_key *key, if (loops++ >= 1024) { printf("We have looped trying to restore files in %s " "too many times to be making progress, " - "stopping\n", dir); + "stopping\n", in_dir); break; } @@ -764,7 +764,7 @@ static int search_dir(struct btrfs_root *root, struct btrfs_key *key, btrfs_dir_item_key_to_cpu(leaf, dir_item, &location); /* full path from root of btrfs being restored */ - snprintf(fs_name, 4096, "%s/%s", dir, filename); + snprintf(fs_name, 4096, "%s/%s", in_dir, filename); if (mreg && REG_NOMATCH == regexec(mreg, fs_name, 0, NULL, 0)) goto next; @@ -896,7 +896,7 @@ next: } if (verbose) - printf("Done searching %s\n", dir); + printf("Done searching %s\n", in_dir); btrfs_free_path(path); return 0; } |