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-restore.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cmds-restore.c') 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; } -- cgit v1.2.1