[Cmake-commits] CMake branch, next, updated. v2.8.4-1588-g89f8947
Brad King
brad.king at kitware.com
Mon May 23 16:00:01 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 89f8947caae0920b39798aeb3164e4f889e24465 (commit)
via 7ff98b7a8c097b3ffcc91289c38244c627c7e142 (commit)
from 93c531efd33ada607f1407aa273b08c689bad9bf (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=89f8947caae0920b39798aeb3164e4f889e24465
commit 89f8947caae0920b39798aeb3164e4f889e24465
Merge: 93c531e 7ff98b7
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon May 23 15:59:59 2011 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon May 23 15:59:59 2011 -0400
Merge topic 'string-RANDOM-seed' into next
7ff98b7 Fix forced-seed argument type in string(RANDOM)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7ff98b7a8c097b3ffcc91289c38244c627c7e142
commit 7ff98b7a8c097b3ffcc91289c38244c627c7e142
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon May 23 15:57:41 2011 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon May 23 15:57:41 2011 -0400
Fix forced-seed argument type in string(RANDOM)
Clang points out that local variable 'seed' needs to be "unsigned int":
Source/cmStringCommand.cxx:828:21: warning: operands of ? are integers
of different signs: 'int' and 'unsigned int' [-Wsign-compare]
srand(force_seed? seed : cmSystemTools::RandomSeed());
^ ~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx
index e3bf08f..3c74dc9 100644
--- a/Source/cmStringCommand.cxx
+++ b/Source/cmStringCommand.cxx
@@ -770,7 +770,7 @@ bool cmStringCommand
static bool seeded = false;
bool force_seed = false;
- int seed = 0;
+ unsigned int seed = 0;
int length = 5;
const char cmStringCommandDefaultAlphabet[] = "qwertyuiopasdfghjklzxcvbnm"
"QWERTYUIOPASDFGHJKLZXCVBNM"
@@ -797,7 +797,7 @@ bool cmStringCommand
else if ( args[i] == "RANDOM_SEED" )
{
++i;
- seed = atoi(args[i].c_str());
+ seed = static_cast<unsigned int>(atoi(args[i].c_str()));
force_seed = true;
}
}
-----------------------------------------------------------------------
Summary of changes:
Source/cmStringCommand.cxx | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list