diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-07-09 14:51:26 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-07-09 14:51:26 +0000 |
commit | 90173785a8b76e6db8d8adb71e4bc4b96715ece6 (patch) | |
tree | 8cc1c4a09b6aaa488fe03bc769da2851b9b73899 /random.c | |
parent | 94ce481263d0eb09ed366b42d8b3afddbd471e16 (diff) | |
download | ruby-90173785a8b76e6db8d8adb71e4bc4b96715ece6.tar.gz |
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
Diffstat (limited to 'random.c')
-rw-r--r-- | random.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 } |