Skip to content

Commit

Permalink
* process.c (rb_fork_err): suppress gcc 4.4 warnings.
Browse files Browse the repository at this point in the history
* random.c (fill_random_seed): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Jul 13, 2010
1 parent 9a8440e commit 52aa6ab
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Tue Jul 13 21:28:35 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>

* process.c (rb_fork_err): suppress gcc 4.4 warnings.

* random.c (fill_random_seed): ditto.

Tue Jul 13 21:01:44 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>

* ext/pty/pty.c (establishShell): chfunc must not raise any
Expand Down
6 changes: 4 additions & 2 deletions process.c
Original file line number Diff line number Diff line change
Expand Up @@ -2513,10 +2513,12 @@ rb_fork_err(int *status, int (*chfunc)(void*, char *, size_t), void *charg, VALU
if (!(*chfunc)(charg, errmsg, errmsg_buflen)) _exit(EXIT_SUCCESS);
#ifdef FD_CLOEXEC
err = errno;
(void)write(ep[1], &err, sizeof(err));
if (write(ep[1], &err, sizeof(err)) < 0) err = errno;
if (errmsg && 0 < errmsg_buflen) {
errmsg[errmsg_buflen-1] = '\0';
(void)write(ep[1], errmsg, strlen(errmsg));
errmsg_buflen = strlen(errmsg);
if (errmsg_buflen > 0 &&write(ep[1], errmsg, errmsg_buflen) < 0)
err = errno;
}
#endif
#if EXIT_SUCCESS == 127
Expand Down
4 changes: 3 additions & 1 deletion random.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 52aa6ab

Please sign in to comment.