[Cmake-commits] CMake branch, master, updated. v2.8.3-339-g75191fa

KWSys Robot kwrobot at kitware.com
Tue Dec 28 09:57:11 EST 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
       via  75191fa31281732ddbfd621af80bc188de9cd097 (commit)
      from  428e0e0ab95c7bd8cb4cddd637b36d338cad0c10 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=75191fa31281732ddbfd621af80bc188de9cd097
commit 75191fa31281732ddbfd621af80bc188de9cd097
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Dec 28 09:56:15 2010 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Dec 28 09:57:09 2010 -0500

    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*".

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 )
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index 60d6869..cef2de6 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -734,10 +734,11 @@ bool SystemTools::WriteRegistryValue(const char *key, const char *value,
   
   HKEY hKey;
   DWORD dwDummy;
+  char lpClass[] = "";
   if(RegCreateKeyEx(primaryKey, 
                     second.c_str(), 
                     0, 
-                    "",
+                    lpClass,
                     REG_OPTION_NON_VOLATILE,
                     SystemToolsMakeRegistryMode(KEY_WRITE, view),
                     NULL,

-----------------------------------------------------------------------

Summary of changes:
 Source/kwsys/Registry.cxx    |    3 ++-
 Source/kwsys/SystemTools.cxx |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list