summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-11-20 16:10:11 (GMT)
committerBrad King <brad.king@kitware.com>2007-11-20 16:10:11 (GMT)
commiteee575283d75686deeea252ef82baa18c7dfe994 (patch)
tree6811c8d6cd6903659542ab8dee079c3aea252795
parentd5ff71a14e2f890670d8e090850ed06b99dbe7ff (diff)
downloadCMake-eee575283d75686deeea252ef82baa18c7dfe994.zip
CMake-eee575283d75686deeea252ef82baa18c7dfe994.tar.gz
CMake-eee575283d75686deeea252ef82baa18c7dfe994.tar.bz2
STYLE: Fixed line-too-long. COMP: Fixed warnings about lossy conversions.
-rw-r--r--Source/cmCallVisualStudioMacro.cxx10
-rw-r--r--Source/cmGlobalGenerator.cxx4
-rw-r--r--Source/cmGlobalVisualStudio8Generator.cxx3
-rw-r--r--Source/cmGlobalVisualStudio9Generator.cxx3
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx47
5 files changed, 46 insertions, 21 deletions
diff --git a/Source/cmCallVisualStudioMacro.cxx b/Source/cmCallVisualStudioMacro.cxx
index 635e264..8011284 100644
--- a/Source/cmCallVisualStudioMacro.cxx
+++ b/Source/cmCallVisualStudioMacro.cxx
@@ -347,7 +347,8 @@ HRESULT FindVisualStudioInstances(
//std::cout << "Found Visual Studio instance." << std::endl;
//std::cout << " ROT entry name: " << it->first << std::endl;
- //std::cout << " ROT entry object: " << (IUnknown*) it->second << std::endl;
+ //std::cout << " ROT entry object: "
+ // << (IUnknown*) it->second << std::endl;
//std::cout << " slnFile: " << slnFile << std::endl;
//std::cout << " slnName: " << slnName << std::endl;
}
@@ -381,7 +382,7 @@ int cmCallVisualStudioMacro::GetNumberOfRunningVisualStudioInstances(
if(SUCCEEDED(hr))
{
- count = instances.size();
+ count = static_cast<int>(instances.size());
}
// Force release all COM pointers before CoUninitialize:
@@ -389,6 +390,8 @@ int cmCallVisualStudioMacro::GetNumberOfRunningVisualStudioInstances(
CoUninitialize();
}
+#else
+ (void)slnFile;
#endif
return count;
@@ -449,6 +452,9 @@ int cmCallVisualStudioMacro::CallMacro(
CoUninitialize();
}
#else
+ (void)slnFile;
+ (void)macro;
+ (void)args;
cmSystemTools::Error("cmCallVisualStudioMacro::CallMacro is not "
"supported on this platform");
#endif
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 7acd92b..06d433a 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1795,7 +1795,9 @@ void cmGlobalGenerator::FileReplacedDuringGenerate(const std::string& filename)
this->FilesReplacedDuringGenerate.push_back(filename);
}
-void cmGlobalGenerator::GetFilesReplacedDuringGenerate(std::vector<std::string>& filenames)
+void
+cmGlobalGenerator
+::GetFilesReplacedDuringGenerate(std::vector<std::string>& filenames)
{
filenames.clear();
std::copy(
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index 55f1305..275fc88 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -79,7 +79,8 @@ std::string cmGlobalVisualStudio8Generator::GetUserMacrosDirectory()
// base begins with the VisualStudioProjectsLocation reg value...
if (cmSystemTools::ReadRegistryValue(
- "HKEY_CURRENT_USER\\Software\\Microsoft\\VisualStudio\\8.0;VisualStudioProjectsLocation",
+ "HKEY_CURRENT_USER\\Software\\Microsoft\\VisualStudio\\8.0;"
+ "VisualStudioProjectsLocation",
base))
{
cmSystemTools::ConvertToUnixSlashes(base);
diff --git a/Source/cmGlobalVisualStudio9Generator.cxx b/Source/cmGlobalVisualStudio9Generator.cxx
index 06d959b..0c37b7b 100644
--- a/Source/cmGlobalVisualStudio9Generator.cxx
+++ b/Source/cmGlobalVisualStudio9Generator.cxx
@@ -69,7 +69,8 @@ std::string cmGlobalVisualStudio9Generator::GetUserMacrosDirectory()
// base begins with the VisualStudioProjectsLocation reg value...
if (cmSystemTools::ReadRegistryValue(
- "HKEY_CURRENT_USER\\Software\\Microsoft\\VisualStudio\\9.0;VisualStudioProjectsLocation",
+ "HKEY_CURRENT_USER\\Software\\Microsoft\\VisualStudio\\9.0;"
+ "VisualStudioProjectsLocation",
base))
{
cmSystemTools::ConvertToUnixSlashes(base);
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index 66f771f..fdc62f4 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -380,9 +380,11 @@ bool IsVisualStudioMacrosFileRegistered(const std::string& macrosFile,
LONG result = ERROR_SUCCESS;
DWORD index = 0;
- keyname = "Software\\Microsoft\\VisualStudio\\8.0\\vsmacros\\OtherProjects7";
+ keyname =
+ "Software\\Microsoft\\VisualStudio\\8.0\\vsmacros\\OtherProjects7";
hkey = NULL;
- result = RegOpenKeyEx(HKEY_CURRENT_USER, keyname.c_str(), 0, KEY_READ, &hkey);
+ result = RegOpenKeyEx(HKEY_CURRENT_USER, keyname.c_str(),
+ 0, KEY_READ, &hkey);
if (ERROR_SUCCESS == result)
{
// Iterate the subkeys and look for the values of interest in each subkey:
@@ -394,7 +396,8 @@ bool IsVisualStudioMacrosFileRegistered(const std::string& macrosFile,
lastWriteTime.dwHighDateTime = 0;
lastWriteTime.dwLowDateTime = 0;
- while (ERROR_SUCCESS == RegEnumKeyEx(hkey, index, subkeyname, &cch_subkeyname,
+ while (ERROR_SUCCESS == RegEnumKeyEx(hkey, index, subkeyname,
+ &cch_subkeyname,
0, keyclass, &cch_keyclass, &lastWriteTime))
{
// Open the subkey and query the values of interest:
@@ -405,15 +408,18 @@ bool IsVisualStudioMacrosFileRegistered(const std::string& macrosFile,
DWORD valueType = REG_SZ;
CHAR data1[256];
DWORD cch_data1 = sizeof(data1)/sizeof(data1[0]);
- RegQueryValueEx(hsubkey, "Path", 0, &valueType, (LPBYTE) &data1[0], &cch_data1);
+ RegQueryValueEx(hsubkey, "Path", 0, &valueType,
+ (LPBYTE) &data1[0], &cch_data1);
DWORD data2 = 0;
DWORD cch_data2 = sizeof(data2);
- RegQueryValueEx(hsubkey, "Security", 0, &valueType, (LPBYTE) &data2, &cch_data2);
+ RegQueryValueEx(hsubkey, "Security", 0, &valueType,
+ (LPBYTE) &data2, &cch_data2);
DWORD data3 = 0;
DWORD cch_data3 = sizeof(data3);
- RegQueryValueEx(hsubkey, "StorageFormat", 0, &valueType, (LPBYTE) &data3, &cch_data3);
+ RegQueryValueEx(hsubkey, "StorageFormat", 0, &valueType,
+ (LPBYTE) &data3, &cch_data3);
s2 = cmSystemTools::LowerCase(data1);
cmSystemTools::ConvertToUnixSlashes(s2);
@@ -478,23 +484,28 @@ bool IsVisualStudioMacrosFileRegistered(const std::string& macrosFile,
nextAvailableSubKeyName = ossNext.str();
- keyname = "Software\\Microsoft\\VisualStudio\\8.0\\vsmacros\\RecordingProject7";
+ keyname =
+ "Software\\Microsoft\\VisualStudio\\8.0\\vsmacros\\RecordingProject7";
hkey = NULL;
- result = RegOpenKeyEx(HKEY_CURRENT_USER, keyname.c_str(), 0, KEY_READ, &hkey);
+ result = RegOpenKeyEx(HKEY_CURRENT_USER, keyname.c_str(),
+ 0, KEY_READ, &hkey);
if (ERROR_SUCCESS == result)
{
DWORD valueType = REG_SZ;
CHAR data1[256];
DWORD cch_data1 = sizeof(data1)/sizeof(data1[0]);
- RegQueryValueEx(hkey, "Path", 0, &valueType, (LPBYTE) &data1[0], &cch_data1);
+ RegQueryValueEx(hkey, "Path", 0, &valueType,
+ (LPBYTE) &data1[0], &cch_data1);
DWORD data2 = 0;
DWORD cch_data2 = sizeof(data2);
- RegQueryValueEx(hkey, "Security", 0, &valueType, (LPBYTE) &data2, &cch_data2);
+ RegQueryValueEx(hkey, "Security", 0, &valueType,
+ (LPBYTE) &data2, &cch_data2);
DWORD data3 = 0;
DWORD cch_data3 = sizeof(data3);
- RegQueryValueEx(hkey, "StorageFormat", 0, &valueType, (LPBYTE) &data3, &cch_data3);
+ RegQueryValueEx(hkey, "StorageFormat", 0, &valueType,
+ (LPBYTE) &data3, &cch_data3);
s2 = cmSystemTools::LowerCase(data1);
cmSystemTools::ConvertToUnixSlashes(s2);
@@ -525,7 +536,8 @@ void WriteVSMacrosFileRegistryEntry(
const std::string& nextAvailableSubKeyName,
const std::string& macrosFile)
{
- std::string keyname = "Software\\Microsoft\\VisualStudio\\8.0\\vsmacros\\OtherProjects7";
+ std::string keyname =
+ "Software\\Microsoft\\VisualStudio\\8.0\\vsmacros\\OtherProjects7";
HKEY hkey = NULL;
LONG result = RegOpenKeyEx(HKEY_CURRENT_USER, keyname.c_str(), 0,
KEY_READ|KEY_WRITE, &hkey);
@@ -543,7 +555,7 @@ void WriteVSMacrosFileRegistryEntry(
cmSystemTools::ReplaceString(s, "/", "\\");
result = RegSetValueEx(hsubkey, "Path", 0, REG_SZ, (LPBYTE) s.c_str(),
- strlen(s.c_str()) + 1);
+ static_cast<DWORD>(strlen(s.c_str()) + 1));
if (ERROR_SUCCESS != result)
{
std::cout << "error result 1: " << result << std::endl;
@@ -553,7 +565,8 @@ void WriteVSMacrosFileRegistryEntry(
// Security value is always "1" for sample macros files (seems to be "2"
// if you put the file somewhere outside the standard VSMacros folder)
dw = 1;
- result = RegSetValueEx(hsubkey, "Security", 0, REG_DWORD, (LPBYTE) &dw, sizeof(DWORD));
+ result = RegSetValueEx(hsubkey, "Security",
+ 0, REG_DWORD, (LPBYTE) &dw, sizeof(DWORD));
if (ERROR_SUCCESS != result)
{
std::cout << "error result 2: " << result << std::endl;
@@ -562,7 +575,8 @@ void WriteVSMacrosFileRegistryEntry(
// StorageFormat value is always "0" for sample macros files
dw = 0;
- result = RegSetValueEx(hsubkey, "StorageFormat", 0, REG_DWORD, (LPBYTE) &dw, sizeof(DWORD));
+ result = RegSetValueEx(hsubkey, "StorageFormat",
+ 0, REG_DWORD, (LPBYTE) &dw, sizeof(DWORD));
if (ERROR_SUCCESS != result)
{
std::cout << "error result 3: " << result << std::endl;
@@ -573,7 +587,8 @@ void WriteVSMacrosFileRegistryEntry(
}
else
{
- std::cout << "error creating subkey: " << nextAvailableSubKeyName << std::endl;
+ std::cout << "error creating subkey: "
+ << nextAvailableSubKeyName << std::endl;
std::cout << std::endl;
}
RegCloseKey(hkey);