summaryrefslogtreecommitdiff
path: root/cmds-device.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-device.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-device.c')
-rw-r--r--cmds-device.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmds-device.c b/cmds-device.c
index 48ac526c..06df8647 100644
--- a/cmds-device.c
+++ b/cmds-device.c
@@ -282,7 +282,7 @@ static const char * const cmd_dev_stats_usage[] = {
static int cmd_dev_stats(int argc, char **argv)
{
- char *path;
+ char *dev_path;
struct btrfs_ioctl_fs_info_args fi_args;
struct btrfs_ioctl_dev_info_args *di_args = NULL;
int ret;
@@ -314,16 +314,16 @@ static int cmd_dev_stats(int argc, char **argv)
return 1;
}
- path = argv[optind];
+ dev_path = argv[optind];
- fdmnt = open_path_or_dev_mnt(path, &dirstream);
+ fdmnt = open_path_or_dev_mnt(dev_path, &dirstream);
if (fdmnt < 0) {
- fprintf(stderr, "ERROR: can't access '%s'\n", path);
+ fprintf(stderr, "ERROR: can't access '%s'\n", dev_path);
return 12;
}
- ret = get_fs_info(path, &fi_args, &di_args);
+ ret = get_fs_info(dev_path, &fi_args, &di_args);
if (ret) {
fprintf(stderr, "ERROR: getting dev info for devstats failed: "
"%s\n", strerror(-ret));