summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-09 14:51:26 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-09 14:51:26 (GMT)
commit90173785a8b76e6db8d8adb71e4bc4b96715ece6 (patch)
tree8cc1c4a09b6aaa488fe03bc769da2851b9b73899
parent94ce481263d0eb09ed366b42d8b3afddbd471e16 (diff)
random.c: fix casts
* random.c (fill_random_seed): fix type to cast. this may or may not suppress warnings by icc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--random.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/random.c b/random.c
index b631d77..a1deecf 100644
--- a/random.c
+++ b/random.c
@@ -474,14 +474,14 @@ fill_random_seed(uint32_t seed[DEFAULT_SEED_CNT])
gettimeofday(&tv, 0);
seed[0] ^= tv.tv_usec;
- seed[1] ^= (unsigned int)tv.tv_sec;
+ seed[1] ^= (uint32_t)tv.tv_sec;
#if SIZEOF_TIME_T > SIZEOF_INT
- seed[0] ^= (unsigned int)((time_t)tv.tv_sec >> SIZEOF_INT * CHAR_BIT);
+ seed[0] ^= (uint32_t)((time_t)tv.tv_sec >> SIZEOF_INT * CHAR_BIT);
#endif
seed[2] ^= getpid() ^ (n++ << 16);
- seed[3] ^= (unsigned int)(VALUE)&seed;
+ seed[3] ^= (uint32_t)(VALUE)&seed;
#if SIZEOF_VOIDP > SIZEOF_INT
- seed[2] ^= (unsigned int)((VALUE)&seed >> SIZEOF_INT * CHAR_BIT);
+ seed[2] ^= (uint32_t)((VALUE)&seed >> SIZEOF_INT * CHAR_BIT);
#endif
}