[Cmake-commits] CMake branch, next, updated. v3.1.0-1848-gca12a97

Brad King brad.king at kitware.com
Tue Jan 13 15:17:41 EST 2015


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  ca12a9763d13b8a2ba6dd0cbbff15a277654f120 (commit)
       via  4c3f5201d75267e4f24d7dd61308457041d3a4a3 (commit)
      from  bf3deea7a7a709877500743304f7185789234877 (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=ca12a9763d13b8a2ba6dd0cbbff15a277654f120
commit ca12a9763d13b8a2ba6dd0cbbff15a277654f120
Merge: bf3deea 4c3f520
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jan 13 15:17:40 2015 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jan 13 15:17:40 2015 -0500

    Merge topic 'cdash_upload_file_mode' into next
    
    4c3f5201 jsoncpp: Add missing assert before strcmp in json_value.cpp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4c3f5201d75267e4f24d7dd61308457041d3a4a3
commit 4c3f5201d75267e4f24d7dd61308457041d3a4a3
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jan 13 15:08:32 2015 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Jan 13 15:16:01 2015 -0500

    jsoncpp: Add missing assert before strcmp in json_value.cpp
    
    The strcmp function does not allow NULL pointers, so add an
    assert to tell Clang scan-build that the code does not expect
    a NULL pointer.

diff --git a/Utilities/cmjsoncpp/src/lib_json/json_value.cpp b/Utilities/cmjsoncpp/src/lib_json/json_value.cpp
index b73deac..aabc957 100644
--- a/Utilities/cmjsoncpp/src/lib_json/json_value.cpp
+++ b/Utilities/cmjsoncpp/src/lib_json/json_value.cpp
@@ -195,14 +195,18 @@ Value::CZString& Value::CZString::operator=(CZString other) {
 }
 
 bool Value::CZString::operator<(const CZString& other) const {
-  if (cstr_)
+  if (cstr_) {
+    assert(other.cstr_);
     return strcmp(cstr_, other.cstr_) < 0;
+  }
   return index_ < other.index_;
 }
 
 bool Value::CZString::operator==(const CZString& other) const {
-  if (cstr_)
+  if (cstr_) {
+    assert(other.cstr_);
     return strcmp(cstr_, other.cstr_) == 0;
+  }
   return index_ == other.index_;
 }
 

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

Summary of changes:
 Utilities/cmjsoncpp/src/lib_json/json_value.cpp |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list