summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-07-22 02:16:37 (GMT)
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-07-22 02:16:37 (GMT)
commit16b9431ae01d83de80db7ef3e411d9771ee845e4 (patch)
treef3f577a111e7b489673c0a48be6c5264bef3e1f2 /src
parentc214ebc830aa918d54e535c6caa2da6317877e12 (diff)
downloadgoogletest-16b9431ae01d83de80db7ef3e411d9771ee845e4.zip
googletest-16b9431ae01d83de80db7ef3e411d9771ee845e4.tar.gz
googletest-16b9431ae01d83de80db7ef3e411d9771ee845e4.tar.bz2
Makes gtest compile clean with gcc -Wall -Werror (by Zhanyong Wan); refactors scons script (by Vlad Losev).
Diffstat (limited to 'src')
-rw-r--r--src/gtest-internal-inl.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gtest-internal-inl.h b/src/gtest-internal-inl.h
index 5bb981d..189852e 100644
--- a/src/gtest-internal-inl.h
+++ b/src/gtest-internal-inl.h
@@ -93,7 +93,7 @@ const char kShuffleFlag[] = "shuffle";
const char kThrowOnFailureFlag[] = "throw_on_failure";
// A valid random seed must be in [1, kMaxRandomSeed].
-const unsigned int kMaxRandomSeed = 99999;
+const int kMaxRandomSeed = 99999;
// Returns the current time in milliseconds.
TimeInMillis GetTimeInMillis();
@@ -108,7 +108,8 @@ inline int GetRandomSeedFromFlag(Int32 random_seed_flag) {
// Normalizes the actual seed to range [1, kMaxRandomSeed] such that
// it's easy to type.
const int normalized_seed =
- static_cast<int>((raw_seed - 1U) % kMaxRandomSeed) + 1;
+ static_cast<int>((raw_seed - 1U) %
+ static_cast<unsigned int>(kMaxRandomSeed)) + 1;
return normalized_seed;
}