From 3229c32008a9a1a3d83463ccbcd97013c10668d7 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 18 Feb 2009 06:21:04 +0000 Subject: [PATCH] * 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 --- io.c | 8 ++++---- process.c | 4 ++-- random.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/io.c b/io.c index 6f0b9d034f..3655d61353 100644 --- a/io.c +++ b/io.c @@ -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 diff --git a/process.c b/process.c index 2c9ef5021a..4abbb48e3c 100644 --- a/process.c +++ b/process.c @@ -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 diff --git a/random.c b/random.c index 484c1902fb..3c74a2acb6 100644 --- a/random.c +++ b/random.c @@ -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); }