summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmCTest.cxx4
-rw-r--r--Source/cmGlobalGenerator.cxx4
-rw-r--r--Source/cmake.cxx4
3 files changed, 5 insertions, 7 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 5c8abc3..e82ef4b 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -2820,7 +2820,6 @@ int cmCTest::RunMakeCommand(const char* command, std::string* output,
int cmCTest::RunTest(std::vector<const char*> argv, std::string* output, int *retVal)
{
-#if 0
if(cmSystemTools::SameFile(argv[0], m_CTestSelf.c_str()))
{
cmCTest inst;
@@ -2840,7 +2839,6 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output, int *re
}
return cmsysProcess_State_Exited;
}
-#endif
std::vector<char> tempOutput;
if ( output )
{
@@ -3000,7 +2998,7 @@ int cmCTest::RunConfigurationScript()
size = 4999;
}
strncpy(ctestEnvStatic[i], envArgs[i].c_str(), size);
- ctestEnvStatic[i][4999] = 0;
+ ctestEnvStatic[i][size] = 0;
putenv(ctestEnvStatic[i]);
}
}
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index ec0de18..a0ca704 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -150,7 +150,7 @@ void cmGlobalGenerator::EnableLanguage(const char* lang,
}
strncpy(envCC, env.c_str(), size);
envCC[size] = 0;
- putenv(envCC);
+ putenv(envCC);
}
}
@@ -178,7 +178,7 @@ void cmGlobalGenerator::EnableLanguage(const char* lang,
size = 4999;
}
strncpy(envCXX, env.c_str(), size);
- envCXX[4999] = 0;
+ envCXX[size] = 0;
putenv(envCXX);
}
}
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 92ff2d7..8416fe2 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -877,7 +877,7 @@ void cmake::SetGlobalGenerator(cmGlobalGenerator *gg)
size = 4999;
}
strncpy(envCC, env.c_str(), size);
- envCC[4999] = 0;
+ envCC[size] = 0;
putenv(envCC);
// Restore CXX
@@ -893,7 +893,7 @@ void cmake::SetGlobalGenerator(cmGlobalGenerator *gg)
size = 4999;
}
strncpy(envCXX, env.c_str(), size);
- envCXX[4999] = 0;
+ envCXX[size] = 0;
putenv(envCXX);
}