[Cmake-commits] CMake branch, next, updated. v2.8.4-1565-gd7b5353

Brad King brad.king at kitware.com
Thu May 19 08:00:44 EDT 2011


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  d7b5353dbdc5e1e4015ea67f86e6a5dcf5ff0573 (commit)
       via  3d92c8c82746636a85eca2f2d86f7714bde1465c (commit)
      from  a5d8527a445eae00f45ddf9dd2686e331b6795c1 (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=d7b5353dbdc5e1e4015ea67f86e6a5dcf5ff0573
commit d7b5353dbdc5e1e4015ea67f86e6a5dcf5ff0573
Merge: a5d8527 3d92c8c
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu May 19 08:00:40 2011 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu May 19 08:00:40 2011 -0400

    Merge topic 'string-RANDOM-seed' into next
    
    3d92c8c Explicitly cast time value in cmSystemTools::RandomSeed


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3d92c8c82746636a85eca2f2d86f7714bde1465c
commit 3d92c8c82746636a85eca2f2d86f7714bde1465c
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu May 19 07:56:04 2011 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu May 19 07:56:04 2011 -0400

    Explicitly cast time value in cmSystemTools::RandomSeed
    
    Use static_cast to avoid warnings like
    
     conversion to ‘unsigned int’ from ‘__time_t’ may alter its value
     conversion to ‘unsigned int’ from ‘__suseconds_t’ may alter its value
    
    We do not care if the value is truncated because we are looking for just
    32 bits anyway.

diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 1491a99..b992054 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -2294,8 +2294,8 @@ unsigned int cmSystemTools::RandomSeed()
   struct timeval t;
   gettimeofday(&t, 0);
   unsigned int pid = static_cast<unsigned int>(getpid());
-  unsigned int tv_sec = t.tv_sec;
-  unsigned int tv_usec = t.tv_usec;
+  unsigned int tv_sec = static_cast<unsigned int>(t.tv_sec);
+  unsigned int tv_usec = static_cast<unsigned int>(t.tv_usec);
   // Since tv_usec never fills more than 11 bits we shift it to fill
   // in the slow-changing high-order bits of tv_sec.
   return tv_sec ^ (tv_usec << 21) ^ pid;

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

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


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list