diff options
author | Brad King <brad.king@kitware.com> | 2010-12-28 14:56:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-12-28 14:57:09 (GMT) |
commit | 75191fa31281732ddbfd621af80bc188de9cd097 (patch) | |
tree | 33bb28b15c01ea79e0bbd95d9919c698e24b01a6 /Source/kwsys/Registry.cxx | |
parent | 428e0e0ab95c7bd8cb4cddd637b36d338cad0c10 (diff) | |
download | CMake-75191fa31281732ddbfd621af80bc188de9cd097.zip CMake-75191fa31281732ddbfd621af80bc188de9cd097.tar.gz CMake-75191fa31281732ddbfd621af80bc188de9cd097.tar.bz2 |
KWSys: Avoid passing string literal as char*
Pass the lpClass argument of RegCreateKeyEx as a real char[] instead of
a string literal. At least one platform declares the argument as char*
instead of "const char*".
Diffstat (limited to 'Source/kwsys/Registry.cxx')
-rw-r--r-- | Source/kwsys/Registry.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/kwsys/Registry.cxx b/Source/kwsys/Registry.cxx index 284e8ad..cd521c9 100644 --- a/Source/kwsys/Registry.cxx +++ b/Source/kwsys/Registry.cxx @@ -401,8 +401,9 @@ bool RegistryHelper::Open(const char *toplevel, const char *subkey, } else { + char lpClass[] = ""; res = ( RegCreateKeyEx(scope, str.str().c_str(), - 0, "", REG_OPTION_NON_VOLATILE, KEY_READ|KEY_WRITE, + 0, lpClass, REG_OPTION_NON_VOLATILE, KEY_READ|KEY_WRITE, NULL, &this->HKey, &dwDummy) == ERROR_SUCCESS ); } if ( res != 0 ) |