[Cmake-commits] CMake branch, next, updated. v3.2.1-1226-g8e5b1aa

Bill Hoffman bill.hoffman at kitware.com
Wed Mar 25 12:39:51 EDT 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  8e5b1aa579c1ec68fd428ef29eecd9723812c3ed (commit)
       via  a4a1b729c63ec81037af06ac1009d12cc1dc3188 (commit)
      from  3aefbb3c78f90c552e4e3c2039302aca3437e959 (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=8e5b1aa579c1ec68fd428ef29eecd9723812c3ed
commit 8e5b1aa579c1ec68fd428ef29eecd9723812c3ed
Merge: 3aefbb3 a4a1b72
Author:     Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Wed Mar 25 12:39:48 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Mar 25 12:39:48 2015 -0400

    Merge topic 'clean-scanbuild-warnings' into next
    
    a4a1b729 Fix warnings from clang scanbuild.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a4a1b729c63ec81037af06ac1009d12cc1dc3188
commit a4a1b729c63ec81037af06ac1009d12cc1dc3188
Author:     Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Wed Mar 25 12:38:37 2015 -0400
Commit:     Bill Hoffman <bill.hoffman at kitware.com>
CommitDate: Wed Mar 25 12:38:37 2015 -0400

    Fix warnings from clang scanbuild.

diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index 0a64bd5..87764e1 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -507,6 +507,11 @@ int cmCPackDebGenerator::createDeb()
       //int retVal = -1;
       res = cmSystemTools::RunSingleCommand(cmd.c_str(), &output,
           &retval, toplevel.c_str(), this->GeneratorVerbose, 0);
+      if ( !res || retval )
+        {
+        cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running cmake -E md5sum "
+                      << cmd << std::endl);
+        }
       // debian md5sums entries are like this:
       // 014f3604694729f3bf19263bac599765  usr/bin/ccmake
       // thus strip the full path (with the trailing slash)
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 0026fd7..df61fe6 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -1343,16 +1343,21 @@ int cmCTest::RunTest(std::vector<const char*> argv,
       }
 
     *retVal = inst.Run(args, output);
-    *output += oss.str();
-    if ( log )
+    if(output)
+      {
+      *output += oss.str();
+      }
+    if ( log && output)
       {
       *log << *output;
       }
     cmSystemTools::ChangeDirectory(oldpath);
-
-    cmCTestLog(this, HANDLER_VERBOSE_OUTPUT,
-      "Internal cmCTest object used to run test." << std::endl
-      <<  *output << std::endl);
+    if(output)
+      {
+      cmCTestLog(this, HANDLER_VERBOSE_OUTPUT,
+                 "Internal cmCTest object used to run test." << std::endl
+                 <<  *output << std::endl);
+      }
 
     return cmsysProcess_State_Exited;
     }
@@ -1422,7 +1427,10 @@ int cmCTest::RunTest(std::vector<const char*> argv,
     *retVal = cmsysProcess_GetExitException(cp);
     std::string outerr = "\n*** Exception executing: ";
     outerr += cmsysProcess_GetExceptionString(cp);
-    *output += outerr;
+    if(output)
+      {
+      *output += outerr;
+      }
     cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, outerr.c_str() << std::endl
       << std::flush);
     }
@@ -1430,7 +1438,10 @@ int cmCTest::RunTest(std::vector<const char*> argv,
     {
     std::string outerr = "\n*** ERROR executing: ";
     outerr += cmsysProcess_GetErrorString(cp);
-    *output += outerr;
+    if(output)
+      {
+      *output += outerr;
+      }
     cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, outerr.c_str() << std::endl
       << std::flush);
     }
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index ae9099e..93e3ac4 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -3422,6 +3422,7 @@ cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args)
 
   // enable HTTP ERROR parsing
   ::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);
+  check_curl_result(res, "UPLOAD cannot set fail on error flag: ");
 
   // enable uploading
   res = ::curl_easy_setopt(curl, CURLOPT_UPLOAD, 1);
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 87f9037..4d7fd60 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -679,7 +679,6 @@ bool cmFindPackageCommand::HandlePackageMode()
     if(cmSystemTools::IsOff(def) || !fileFound)
       {
       fileFound = this->FindConfig();
-      def = this->Makefile->GetDefinition(this->Variable);
       }
 
     // Sanity check.
@@ -1598,7 +1597,6 @@ bool cmFindPackageCommand::CheckVersion(std::string const& config_file)
   if ((haveResult == false) && (this->Version.empty()))
     {
     result = true;
-    haveResult = true;
     }
 
   ConfigFileInfo configFileInfo;
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index eeb9c72..7f355a6 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2208,7 +2208,7 @@ void cmMakefile::AddSourceGroup(const std::vector<std::string>& name,
   if(i==lastElement)
     {
     // group already exists, replace its regular expression
-    if ( regex )
+    if ( regex && sg)
       {
       // We only want to set the regular expression.  If there are already
       // source files in the group, we don't want to remove them.
@@ -2224,7 +2224,11 @@ void cmMakefile::AddSourceGroup(const std::vector<std::string>& name,
     sg = this->GetSourceGroup(currentName);
     i = 0; // last component found
     }
-
+  if(!sg)
+    {
+    cmSystemTools::Error("Could not create source group ");
+    return;
+    }
   // build the whole source group path
   const char* fullname = sg->GetFullName();
   cmGlobalGenerator* gg = this->LocalGenerator->GetGlobalGenerator();
diff --git a/Source/cmSetTargetPropertiesCommand.cxx b/Source/cmSetTargetPropertiesCommand.cxx
index e41a0ca..06217bb 100644
--- a/Source/cmSetTargetPropertiesCommand.cxx
+++ b/Source/cmSetTargetPropertiesCommand.cxx
@@ -25,14 +25,12 @@ bool cmSetTargetPropertiesCommand
 
   // first collect up the list of files
   std::vector<std::string> propertyPairs;
-  bool doingFiles = true;
   int numFiles = 0;
   std::vector<std::string>::const_iterator j;
   for(j= args.begin(); j != args.end();++j)
     {
     if(*j == "PROPERTIES")
       {
-      doingFiles = false;
       // now loop through the rest of the arguments, new style
       ++j;
       if (std::distance(j, args.end()) % 2 != 0)
@@ -43,15 +41,9 @@ bool cmSetTargetPropertiesCommand
       propertyPairs.insert(propertyPairs.end(), j, args.end());
       break;
       }
-    else if (doingFiles)
-      {
-      numFiles++;
-      }
     else
       {
-      this->SetError("called with illegal arguments, maybe missing "
-                     "a PROPERTIES specifier?");
-      return false;
+      numFiles++;
       }
     }
   if(propertyPairs.empty())

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

Summary of changes:
 Source/CPack/cmCPackDebGenerator.cxx    |    5 +++++
 Source/cmCTest.cxx                      |   27 +++++++++++++++++++--------
 Source/cmFileCommand.cxx                |    1 +
 Source/cmFindPackageCommand.cxx         |    2 --
 Source/cmMakefile.cxx                   |    8 ++++++--
 Source/cmSetTargetPropertiesCommand.cxx |   10 +---------
 6 files changed, 32 insertions(+), 21 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list