diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-07-13 12:28:37 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-07-13 12:28:37 +0000 |
commit | 52aa6ab21dcf2e0c6cb0190fbc4f8276248ade6b (patch) | |
tree | 490757266517315416865f290e099d341f018bdf /random.c | |
parent | 9a8440e5d46c67f9938b58d7491659d094c7c4b2 (diff) | |
download | ruby-52aa6ab21dcf2e0c6cb0190fbc4f8276248ade6b.tar.gz |
* process.c (rb_fork_err): suppress gcc 4.4 warnings.
* random.c (fill_random_seed): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'random.c')
-rw-r--r-- | random.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -489,7 +489,9 @@ fill_random_seed(unsigned int seed[DEFAULT_SEED_CNT]) #endif )) >= 0) { if (fstat(fd, &statbuf) == 0 && S_ISCHR(statbuf.st_mode)) { - (void)read(fd, seed, DEFAULT_SEED_LEN); + if (read(fd, seed, DEFAULT_SEED_LEN) < DEFAULT_SEED_LEN) { + /* abandon */; + } } close(fd); } |