diff options
author | Stephen Kelly <steveire@gmail.com> | 2012-11-07 12:46:44 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-11-13 18:26:10 (GMT) |
commit | 5f6432f2537203084a40f0d204a5643091f6a915 (patch) | |
tree | 214ccc5582d16dfee4d011b40933826a5e07d103 /Source/cmcldeps.cxx | |
parent | 9f16d428a1146e4f108dd67e743c2c00911c4383 (diff) | |
download | CMake-5f6432f2537203084a40f0d204a5643091f6a915.zip CMake-5f6432f2537203084a40f0d204a5643091f6a915.tar.gz CMake-5f6432f2537203084a40f0d204a5643091f6a915.tar.bz2 |
Resolve warnings about shadowing parameters and local variables.
Diffstat (limited to 'Source/cmcldeps.cxx')
-rw-r--r-- | Source/cmcldeps.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmcldeps.cxx b/Source/cmcldeps.cxx index 34350bf..04dab59 100644 --- a/Source/cmcldeps.cxx +++ b/Source/cmcldeps.cxx @@ -237,12 +237,14 @@ int main() { // needed to suppress filename output of msvc tools std::string srcfilename; + { std::string::size_type pos = srcfile.rfind("\\"); if (pos == std::string::npos) { srcfilename = srcfile; } else { srcfilename = srcfile.substr(pos + 1); } + } std::string nol = " /nologo "; std::string show = " /showIncludes "; @@ -266,10 +268,12 @@ int main() { // call cl in object dir so the .i is generated there std::string objdir; + { std::string::size_type pos = objfile.rfind("\\"); if (pos != std::string::npos) { objdir = objfile.substr(0, pos); } + } // extract dependencies with cl.exe int exit_code = process(srcfilename, dfile, objfile, |