[Cmake-commits] CMake branch, next, updated. v3.3.1-2829-ged8a460

Brad King brad.king at kitware.com
Thu Sep 10 09:17:21 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  ed8a460aaec9162ff5185dd5578960392d24cf44 (commit)
       via  a0446d9337da8e1d8105e5b662b4a0e6857112f4 (commit)
       via  ac77a569946d19766016841fa8b2c6174badf07e (commit)
      from  f1b98931036d13e03c960fd1616699948821e67a (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=ed8a460aaec9162ff5185dd5578960392d24cf44
commit ed8a460aaec9162ff5185dd5578960392d24cf44
Merge: f1b9893 a0446d9
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Sep 10 09:17:20 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Sep 10 09:17:20 2015 -0400

    Merge topic 'fix-TrimWhitespace' into next
    
    a0446d93 cmSystemTools: Fix TrimWhitespace for non-ascii strings (#15735)
    ac77a569 CMake Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a0446d9337da8e1d8105e5b662b4a0e6857112f4
commit a0446d9337da8e1d8105e5b662b4a0e6857112f4
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Sep 10 09:10:47 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Sep 10 09:13:05 2015 -0400

    cmSystemTools: Fix TrimWhitespace for non-ascii strings (#15735)
    
    Since commit v2.8.11~59^2 (cmSystemTools: Generalize TrimWhitespace to
    all whitespace, 2013-03-27) we incorrectly use `c <= ' '` to determine
    if `c` is a whitespace character.  With a signed `char` type UTF-8
    encoded strings may be truncated because values above 0x7f appear
    negative and therefore less than 0x20.  Use `isspace(c)` instead.

diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index b1b7f47..3a84e11 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -228,13 +228,13 @@ std::string cmSystemTools::HelpFileName(std::string name)
 std::string cmSystemTools::TrimWhitespace(const std::string& s)
 {
   std::string::const_iterator start = s.begin();
-  while(start != s.end() && *start <= ' ')
+  while(start != s.end() && isspace(*start))
     ++start;
   if (start == s.end())
     return "";
 
   std::string::const_iterator stop = s.end()-1;
-  while(*stop <= ' ')
+  while(isspace(*stop))
     --stop;
   return std::string(start, stop+1);
 }

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

Summary of changes:
 Source/CMakeVersion.cmake |    2 +-
 Source/cmSystemTools.cxx  |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list