1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* io.c (rb_write_error2, argf_next_argv), process.c (rb_fork_err),

random.c (fill_random_seed): suppress warnings.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-02-18 06:21:04 +00:00
parent 1128e61562
commit 3229c32008
3 changed files with 7 additions and 7 deletions

8
io.c
View file

@ -5813,7 +5813,7 @@ void
rb_write_error2(const char *mesg, long len)
{
if (rb_stderr == orig_stderr || RFILE(orig_stderr)->fptr->fd < 0) {
fwrite(mesg, sizeof(char), len, stderr);
(void)fwrite(mesg, sizeof(char), len, stderr);
}
else {
rb_io_write(rb_stderr, rb_str_new(mesg, len));
@ -6277,10 +6277,10 @@ argf_next_argv(VALUE argf)
chmod(fn, st.st_mode);
#endif
if (st.st_uid!=st2.st_uid || st.st_gid!=st2.st_gid) {
#ifdef __SYMBIAN32__
chown(fn, st.st_uid, st.st_gid);
#ifdef HAVE_FCHOWN
(void)fchown(fw, st.st_uid, st.st_gid);
#else
fchown(fw, st.st_uid, st.st_gid);
(void)chown(fn, st.st_uid, st.st_gid);
#endif
}
#endif

View file

@ -2486,10 +2486,10 @@ 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;
write(ep[1], &err, sizeof(err));
(void)write(ep[1], &err, sizeof(err));
if (errmsg && 0 < errmsg_buflen) {
errmsg[errmsg_buflen-1] = '\0';
write(ep[1], errmsg, strlen(errmsg));
(void)write(ep[1], errmsg, strlen(errmsg));
}
#endif
#if EXIT_SUCCESS == 127

View file

@ -297,7 +297,7 @@ fill_random_seed(unsigned long seed[DEFAULT_SEED_CNT])
#endif
)) >= 0) {
if (fstat(fd, &statbuf) == 0 && S_ISCHR(statbuf.st_mode)) {
read(fd, seed, DEFAULT_SEED_LEN);
(void)read(fd, seed, DEFAULT_SEED_LEN);
}
close(fd);
}