Resolve warnings about shadowing parameters and local variables.
This commit is contained in:
parent
9f16d428a1
commit
5f6432f253
|
@ -204,7 +204,6 @@ void cmGlobalVisualStudio8Generator::AddCheckTarget()
|
||||||
// overwritten by the CreateVCProjBuildRule.
|
// overwritten by the CreateVCProjBuildRule.
|
||||||
// (this could be avoided with per-target source files)
|
// (this could be avoided with per-target source files)
|
||||||
const char* no_main_dependency = 0;
|
const char* no_main_dependency = 0;
|
||||||
const char* no_working_directory = 0;
|
|
||||||
if(cmSourceFile* file =
|
if(cmSourceFile* file =
|
||||||
mf->AddCustomCommandToOutput(
|
mf->AddCustomCommandToOutput(
|
||||||
stamps, listFiles,
|
stamps, listFiles,
|
||||||
|
|
|
@ -75,7 +75,6 @@ void cmGlobalVisualStudioGenerator::Generate()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Now make all targets depend on the ALL_BUILD target
|
// Now make all targets depend on the ALL_BUILD target
|
||||||
cmTargets targets;
|
|
||||||
for(std::vector<cmLocalGenerator*>::iterator i = gen.begin();
|
for(std::vector<cmLocalGenerator*>::iterator i = gen.begin();
|
||||||
i != gen.end(); ++i)
|
i != gen.end(); ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -326,18 +326,18 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
|
||||||
{
|
{
|
||||||
cmSystemTools::ReplaceString(source, "$(IntDir)/", "");
|
cmSystemTools::ReplaceString(source, "$(IntDir)/", "");
|
||||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||||
std::ofstream fout(source.c_str(),
|
std::ofstream sourceFout(source.c_str(),
|
||||||
std::ios::binary | std::ios::out
|
std::ios::binary | std::ios::out
|
||||||
| std::ios::trunc);
|
| std::ios::trunc);
|
||||||
#else
|
#else
|
||||||
std::ofstream fout(source.c_str(),
|
std::ofstream sourceFout(source.c_str(),
|
||||||
std::ios::out | std::ios::trunc);
|
std::ios::out | std::ios::trunc);
|
||||||
#endif
|
#endif
|
||||||
if(fout)
|
if(sourceFout)
|
||||||
{
|
{
|
||||||
fout.write("# generated from CMake",22);
|
sourceFout.write("# generated from CMake",22);
|
||||||
fout.flush();
|
sourceFout.flush();
|
||||||
fout.close();
|
sourceFout.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -914,12 +914,12 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
|
||||||
// for FAT32 file systems, which can cause an empty manifest
|
// for FAT32 file systems, which can cause an empty manifest
|
||||||
// to be embedded into the resulting executable. See CMake
|
// to be embedded into the resulting executable. See CMake
|
||||||
// bug #2617.
|
// bug #2617.
|
||||||
const char* tool = "VCManifestTool";
|
const char* manifestTool = "VCManifestTool";
|
||||||
if(this->FortranProject)
|
if(this->FortranProject)
|
||||||
{
|
{
|
||||||
tool = "VFManifestTool";
|
manifestTool = "VFManifestTool";
|
||||||
}
|
}
|
||||||
fout << "\t\t\t<Tool\n\t\t\t\tName=\"" << tool << "\"\n"
|
fout << "\t\t\t<Tool\n\t\t\t\tName=\"" << manifestTool << "\"\n"
|
||||||
<< "\t\t\t\tUseFAT32Workaround=\"true\"\n"
|
<< "\t\t\t\tUseFAT32Workaround=\"true\"\n"
|
||||||
<< "\t\t\t/>\n";
|
<< "\t\t\t/>\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -237,12 +237,14 @@ int main() {
|
||||||
|
|
||||||
// needed to suppress filename output of msvc tools
|
// needed to suppress filename output of msvc tools
|
||||||
std::string srcfilename;
|
std::string srcfilename;
|
||||||
|
{
|
||||||
std::string::size_type pos = srcfile.rfind("\\");
|
std::string::size_type pos = srcfile.rfind("\\");
|
||||||
if (pos == std::string::npos) {
|
if (pos == std::string::npos) {
|
||||||
srcfilename = srcfile;
|
srcfilename = srcfile;
|
||||||
} else {
|
} else {
|
||||||
srcfilename = srcfile.substr(pos + 1);
|
srcfilename = srcfile.substr(pos + 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::string nol = " /nologo ";
|
std::string nol = " /nologo ";
|
||||||
std::string show = " /showIncludes ";
|
std::string show = " /showIncludes ";
|
||||||
|
@ -266,10 +268,12 @@ int main() {
|
||||||
|
|
||||||
// call cl in object dir so the .i is generated there
|
// call cl in object dir so the .i is generated there
|
||||||
std::string objdir;
|
std::string objdir;
|
||||||
|
{
|
||||||
std::string::size_type pos = objfile.rfind("\\");
|
std::string::size_type pos = objfile.rfind("\\");
|
||||||
if (pos != std::string::npos) {
|
if (pos != std::string::npos) {
|
||||||
objdir = objfile.substr(0, pos);
|
objdir = objfile.substr(0, pos);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// extract dependencies with cl.exe
|
// extract dependencies with cl.exe
|
||||||
int exit_code = process(srcfilename, dfile, objfile,
|
int exit_code = process(srcfilename, dfile, objfile,
|
||||||
|
|
|
@ -31,14 +31,14 @@ int main (int argc, char *argv[])
|
||||||
int cc;
|
int cc;
|
||||||
for ( cc = 2; cc < argc; cc ++ )
|
for ( cc = 2; cc < argc; cc ++ )
|
||||||
{
|
{
|
||||||
std::string arg = argv[cc];
|
std::string nextArg = argv[cc];
|
||||||
if ( (arg.find_first_of(" ") != arg.npos) &&
|
if ( (nextArg.find_first_of(" ") != nextArg.npos) &&
|
||||||
(arg.find_first_of("\"") == arg.npos) )
|
(nextArg.find_first_of("\"") == nextArg.npos) )
|
||||||
{
|
{
|
||||||
arg = "\"" + arg + "\"";
|
nextArg = "\"" + nextArg + "\"";
|
||||||
}
|
}
|
||||||
command += " ";
|
command += " ";
|
||||||
command += arg;
|
command += nextArg;
|
||||||
}
|
}
|
||||||
|
|
||||||
return cmWin32ProcessExecution::Windows9xHack(command.c_str());
|
return cmWin32ProcessExecution::Windows9xHack(command.c_str());
|
||||||
|
|
Loading…
Reference in New Issue