From c10098f28be209e90277925e3f983b7e62d1d037 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Tue, 19 Feb 2013 05:56:06 -0500 Subject: scons: Fix up numerous warnings about name shadowing This patch address the most important name shadowing warnings (as produced when using gcc/clang with -Wshadow). There are many locations where constructor parameters and function parameters shadow local variables, but these are left unchanged. --- src/base/output.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/base/output.cc') diff --git a/src/base/output.cc b/src/base/output.cc index c0ddd0fae..912ec20e9 100644 --- a/src/base/output.cc +++ b/src/base/output.cc @@ -233,27 +233,27 @@ OutputDirectory::remove(const string &name, bool recursive) } else { // assume 'name' is a directory if (recursive) { - DIR *dir = opendir(fname.c_str()); + DIR *subdir = opendir(fname.c_str()); // silently ignore removal request for non-existent directory - if ((!dir) && (errno == ENOENT)) + if ((!subdir) && (errno == ENOENT)) return; // fail on other errors - if (!dir) { + if (!subdir) { perror("opendir"); fatal("Error opening directory for recursive removal '%s'\n", fname); } - struct dirent *de = readdir(dir); + struct dirent *de = readdir(subdir); while (de != NULL) { // ignore files starting with a '.'; user must delete those // manually if they really want to if (de->d_name[0] != '.') remove(name + PATH_SEPARATOR + de->d_name, recursive); - de = readdir(dir); + de = readdir(subdir); } } -- cgit v1.2.3