diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-16 09:43:01 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-16 09:43:01 +0000 |
commit | 3622071601cd1d325a0155cd8c37df2692374722 (patch) | |
tree | fb556e09da1734002f13742ec965383d75a508a9 | |
parent | b0c869c983bc0e468113728eeea526479752d8bd (diff) | |
download | ruby-3622071601cd1d325a0155cd8c37df2692374722.tar.gz |
* random.c (fill_random_seed): suppress a warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | random.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Thu Jul 16 18:42:56 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * random.c (fill_random_seed): suppress a warning. + Thu Jul 16 18:30:20 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> * hash.c (rb_hash_aset, recursive_hash): rejects recursive hash. @@ -423,7 +423,7 @@ fill_random_seed(unsigned int seed[DEFAULT_SEED_CNT]) seed[0] ^= tv.tv_usec; seed[1] ^= (unsigned int)tv.tv_sec; #if SIZEOF_TIME_T > SIZEOF_INT - seed[0] ^= (unsigned int)(tv.tv_sec >> SIZEOF_INT * CHAR_BIT); + seed[0] ^= (unsigned int)((time_t)tv.tv_sec >> SIZEOF_INT * CHAR_BIT); #endif seed[2] ^= getpid() ^ (n++ << 16); seed[3] ^= (unsigned int)(VALUE)&seed; |