[Cmake-commits] CMake branch, next, updated. v3.6.1-1784-g83d0c93

Daniel Pfeifer daniel at pfeifer-mail.de
Mon Sep 5 16:10:31 EDT 2016


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  83d0c9351f516f3793551e8b6ef8fcea054dc9f5 (commit)
       via  1a9de8035c35cdb3e0501ce2cf2f816e4220bea0 (commit)
      from  9e42dba027b1e2860a21dcf3617f13c8adac7204 (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=83d0c9351f516f3793551e8b6ef8fcea054dc9f5
commit 83d0c9351f516f3793551e8b6ef8fcea054dc9f5
Merge: 9e42dba 1a9de80
Author:     Daniel Pfeifer <daniel at pfeifer-mail.de>
AuthorDate: Mon Sep 5 16:10:29 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Sep 5 16:10:29 2016 -0400

    Merge topic 'macro-parenthesis' into next
    
    1a9de803 surround macro arguments with parentheses


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1a9de8035c35cdb3e0501ce2cf2f816e4220bea0
commit 1a9de8035c35cdb3e0501ce2cf2f816e4220bea0
Author:     Daniel Pfeifer <daniel at pfeifer-mail.de>
AuthorDate: Mon Sep 5 22:09:49 2016 +0200
Commit:     Daniel Pfeifer <daniel at pfeifer-mail.de>
CommitDate: Mon Sep 5 22:09:49 2016 +0200

    surround macro arguments with parentheses

diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx
index 0d3725d..377fee1 100644
--- a/Source/CPack/cmCPackArchiveGenerator.cxx
+++ b/Source/CPack/cmCPackArchiveGenerator.cxx
@@ -87,17 +87,17 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(
  */
 #define DECLARE_AND_OPEN_ARCHIVE(filename, archive)                           \
   cmGeneratedFileStream gf;                                                   \
-  gf.Open(filename.c_str(), false, true);                                     \
+  gf.Open((filename).c_str(), false, true);                                   \
   if (!GenerateHeader(&gf)) {                                                 \
     cmCPackLogger(cmCPackLog::LOG_ERROR,                                      \
                   "Problem to generate Header for archive < "                 \
-                    << filename << ">." << std::endl);                        \
+                    << (filename) << ">." << std::endl);                      \
     return 0;                                                                 \
   }                                                                           \
   cmArchiveWrite archive(gf, this->Compress, this->ArchiveFormat);            \
-  if (!archive) {                                                             \
+  if (!(archive)) {                                                           \
     cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem to create archive < "       \
-                    << filename << ">. ERROR =" << archive.GetError()         \
+                    << (filename) << ">. ERROR =" << (archive).GetError()     \
                     << std::endl);                                            \
     return 0;                                                                 \
   }
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx
index cdf292c..754bb5f 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -366,11 +366,11 @@ int cmCTestBuildHandler::ProcessHandler()
   regexes.clear();                                                            \
   cmCTestOptionalLog(this->CTest, DEBUG,                                      \
                      this << "Add " #regexes << std::endl, this->Quiet);      \
-  for (it = strings.begin(); it != strings.end(); ++it) {                     \
+  for (it = (strings).begin(); it != (strings).end(); ++it) {                 \
     cmCTestOptionalLog(this->CTest, DEBUG,                                    \
                        "Add " #strings ": " << *it << std::endl,              \
                        this->Quiet);                                          \
-    regexes.push_back(it->c_str());                                           \
+    (regexes).push_back(it->c_str());                                         \
   }
   cmCTestBuildHandlerPopulateRegexVector(this->CustomErrorMatches,
                                          this->ErrorMatchRegex);
diff --git a/Source/cmCurl.cxx b/Source/cmCurl.cxx
index eec773f..91da239 100644
--- a/Source/cmCurl.cxx
+++ b/Source/cmCurl.cxx
@@ -25,9 +25,9 @@
 #endif
 
 #define check_curl_result(result, errstr)                                     \
-  if (result != CURLE_OK && result != CURLE_NOT_BUILT_IN) {                   \
+  if ((result) != CURLE_OK && (result) != CURLE_NOT_BUILT_IN) {               \
     e += e.empty() ? "" : "\n";                                               \
-    e += errstr;                                                              \
+    e += (errstr);                                                            \
     e += ::curl_easy_strerror(result);                                        \
   }
 
diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx
index 13736b9..70612d1 100644
--- a/Source/cmDocumentation.cxx
+++ b/Source/cmDocumentation.cxx
@@ -166,7 +166,7 @@ bool cmDocumentation::PrintRequestedDocumentation(std::ostream& os)
 
 #define GET_OPT_ARGUMENT(target)                                              \
   if ((i + 1 < argc) && !this->IsOption(argv[i + 1])) {                       \
-    target = argv[i + 1];                                                     \
+    (target) = argv[i + 1];                                                   \
     i = i + 1;                                                                \
   };
 
diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx
index 2824f7e..e88e048 100644
--- a/Source/cmGraphVizWriter.cxx
+++ b/Source/cmGraphVizWriter.cxx
@@ -98,7 +98,7 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName,
   {                                                                           \
     const char* value = mf->GetDefinition(cmakeDefinition);                   \
     if (value) {                                                              \
-      var = value;                                                            \
+      (var) = value;                                                          \
     }                                                                         \
   }
 
@@ -111,7 +111,7 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName,
   {                                                                           \
     const char* value = mf->GetDefinition(cmakeDefinition);                   \
     if (value) {                                                              \
-      var = mf->IsOn(cmakeDefinition);                                        \
+      (var) = mf->IsOn(cmakeDefinition);                                      \
     }                                                                         \
   }
 
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 7688c59..3402191 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -86,9 +86,10 @@ static bool isPolicyNewerThan(cmPolicies::PolicyID id, unsigned int majorV,
   switch (id) {
 #define POLICY_CASE(ID, V_MAJOR, V_MINOR, V_PATCH)                            \
   case cmPolicies::ID:                                                        \
-    return (                                                                  \
-      majorV < V_MAJOR || (majorV == V_MAJOR && minorV + 1 < V_MINOR + 1) ||  \
-      (majorV == V_MAJOR && minorV == V_MINOR && patchV + 1 < V_PATCH + 1));
+    return (majorV < (V_MAJOR) ||                                             \
+            (majorV == (V_MAJOR) && minorV + 1 < (V_MINOR) + 1) ||            \
+            (majorV == (V_MAJOR) && minorV == (V_MINOR) &&                    \
+             patchV + 1 < (V_PATCH) + 1));
     CM_FOR_EACH_POLICY_ID_VERSION(POLICY_CASE)
 #undef POLICY_CASE
     case cmPolicies::CMPCOUNT:
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index be0ee50..7da9975 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1484,7 +1484,7 @@ void list_item_verbose(FILE* out, struct archive_entry* entry)
 
   /* Format the time using 'ls -l' conventions. */
   tim = archive_entry_mtime(entry);
-#define HALF_YEAR (time_t)365 * 86400 / 2
+#define HALF_YEAR ((time_t)365 * 86400 / 2)
 #if defined(_WIN32) && !defined(__CYGWIN__)
 /* Windows' strftime function does not support %e format. */
 #define DAY_FMT "%d"
diff --git a/Tests/CMakeLib/testGeneratedFileStream.cxx b/Tests/CMakeLib/testGeneratedFileStream.cxx
index a31cc42..b419b9e 100644
--- a/Tests/CMakeLib/testGeneratedFileStream.cxx
+++ b/Tests/CMakeLib/testGeneratedFileStream.cxx
@@ -16,7 +16,7 @@
 #include <string>
 
 #define cmFailed(m1, m2)                                                      \
-  std::cout << "FAILED: " << m1 << m2 << "\n";                                \
+  std::cout << "FAILED: " << (m1) << (m2) << "\n";                            \
   failed = 1
 
 int testGeneratedFileStream(int /*unused*/, char* /*unused*/ [])
diff --git a/Tests/CMakeLib/testSystemTools.cxx b/Tests/CMakeLib/testSystemTools.cxx
index 8e8d4c4..e834b93 100644
--- a/Tests/CMakeLib/testSystemTools.cxx
+++ b/Tests/CMakeLib/testSystemTools.cxx
@@ -14,9 +14,9 @@
 #include <iostream>
 #include <string>
 
-#define cmPassed(m) std::cout << "Passed: " << m << "\n"
+#define cmPassed(m) std::cout << "Passed: " << (m) << "\n"
 #define cmFailed(m)                                                           \
-  std::cout << "FAILED: " << m << "\n";                                       \
+  std::cout << "FAILED: " << (m) << "\n";                                     \
   failed = 1
 
 int testSystemTools(int /*unused*/, char* /*unused*/ [])

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

Summary of changes:
 Source/CPack/cmCPackArchiveGenerator.cxx   |    8 ++++----
 Source/CTest/cmCTestBuildHandler.cxx       |    4 ++--
 Source/cmCurl.cxx                          |    4 ++--
 Source/cmDocumentation.cxx                 |    2 +-
 Source/cmGraphVizWriter.cxx                |    4 ++--
 Source/cmPolicies.cxx                      |    7 ++++---
 Source/cmSystemTools.cxx                   |    2 +-
 Tests/CMakeLib/testGeneratedFileStream.cxx |    2 +-
 Tests/CMakeLib/testSystemTools.cxx         |    4 ++--
 9 files changed, 19 insertions(+), 18 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list