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-device.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cmds-device.c') 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)); -- cgit v1.2.3