[Cmake-commits] CMake branch, next, updated. v3.1.0-rc1-221-g50ffef2

Brad King brad.king at kitware.com
Thu Oct 30 14:11:23 EDT 2014


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, next has been updated
       via  50ffef22728c91aab4a5013790783f1e6cb1fff2 (commit)
       via  9a8b76693d2a4af504111234e1bae4cfeab7bd71 (commit)
      from  0d58a36ede819753219c5f417db001182ade3ff9 (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=50ffef22728c91aab4a5013790783f1e6cb1fff2
commit 50ffef22728c91aab4a5013790783f1e6cb1fff2
Merge: 0d58a36 9a8b766
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Oct 30 14:11:23 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Oct 30 14:11:23 2014 -0400

    Merge topic 'VERSION_no_sscanf' into next
    
    9a8b7669 cmSystemTools: Use const_cast more locally


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9a8b76693d2a4af504111234e1bae4cfeab7bd71
commit 9a8b76693d2a4af504111234e1bae4cfeab7bd71
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Oct 30 14:10:30 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Oct 30 14:10:30 2014 -0400

    cmSystemTools: Use const_cast more locally
    
    It is only needed for the second argument to strtoul.  Avoid casting
    earlier to keep the safety checks elsewhere.

diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 3abbc37..3247f7f 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -2634,16 +2634,16 @@ bool cmSystemTools::ChangeRPath(std::string const& file,
 bool cmSystemTools::VersionCompare(cmSystemTools::CompareOp op,
                                    const char* lhss, const char* rhss)
 {
-  char *endl = const_cast<char *>(lhss);
-  char *endr = const_cast<char *>(rhss);
+  const char *endl = lhss;
+  const char *endr = rhss;
   unsigned long lhs, rhs;
 
   while (((*endl >= '0') && (*endl <= '9')) ||
          ((*endr >= '0') && (*endr <= '9')))
     {
     // Do component-wise comparison.
-    lhs = strtoul(endl, &endl, 10);
-    rhs = strtoul(endr, &endr, 10);
+    lhs = strtoul(endl, const_cast<char**>(&endl), 10);
+    rhs = strtoul(endr, const_cast<char**>(&endr), 10);
 
     if(lhs < rhs)
       {

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

Summary of changes:
 Source/cmSystemTools.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list