summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-01-04 20:44:11 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2011-01-04 20:44:11 (GMT)
commit0de5db755420d268279046ccdfea9c8182b5b4ae (patch)
treed418d58c982a5b431adc8990c92400665e289770
parent3556ab9f724589c53a9d00fa7c4ee6236e5b6e2f (diff)
parent0bb22cfabed29e9e2ce6f1b3a551f7ea68311390 (diff)
downloadCMake-0de5db755420d268279046ccdfea9c8182b5b4ae.zip
CMake-0de5db755420d268279046ccdfea9c8182b5b4ae.tar.gz
CMake-0de5db755420d268279046ccdfea9c8182b5b4ae.tar.bz2
Merge topic 'fix-warning-char-string-constant'
0bb22cf Avoid passing string literal to char* type
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx5
-rw-r--r--Source/cmWin32ProcessExecution.cxx3
2 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index 7696e6c..449d090 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -611,8 +611,9 @@ void WriteVSMacrosFileRegistryEntry(
{
// Create the subkey and set the values of interest:
HKEY hsubkey = NULL;
- result = RegCreateKeyEx(hkey, nextAvailableSubKeyName.c_str(), 0, "", 0,
- KEY_READ|KEY_WRITE, 0, &hsubkey, 0);
+ char lpClass[] = "";
+ result = RegCreateKeyEx(hkey, nextAvailableSubKeyName.c_str(), 0,
+ lpClass, 0, KEY_READ|KEY_WRITE, 0, &hsubkey, 0);
if (ERROR_SUCCESS == result)
{
DWORD dw = 0;
diff --git a/Source/cmWin32ProcessExecution.cxx b/Source/cmWin32ProcessExecution.cxx
index d9bd26c..f37e0ff 100644
--- a/Source/cmWin32ProcessExecution.cxx
+++ b/Source/cmWin32ProcessExecution.cxx
@@ -290,7 +290,8 @@ static BOOL RealPopenCreateProcess(const char *cmdstring,
{
PROCESS_INFORMATION piProcInfo;
STARTUPINFO siStartInfo;
- char *s1=0,*s2=0, *s3 = " /c ";
+ char *s1=0,*s2=0;
+ const char *s3 = " /c ";
int i = GetEnvironmentVariable("COMSPEC",NULL,0);
if (i)
{