ruby-changes:10827
From: nobu <ko1@a...>
Date: Wed, 18 Feb 2009 15:21:11 +0900 (JST)
Subject: [ruby-changes:10827] Ruby:r22396 (trunk): * io.c (rb_write_error2, argf_next_argv), process.c (rb_fork_err),
nobu 2009-02-18 15:21:04 +0900 (Wed, 18 Feb 2009) New Revision: 22396 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=22396 Log: * io.c (rb_write_error2, argf_next_argv), process.c (rb_fork_err), random.c (fill_random_seed): suppress warnings. Modified files: trunk/io.c trunk/process.c trunk/random.c Index: io.c =================================================================== --- io.c (revision 22395) +++ io.c (revision 22396) @@ -5813,7 +5813,7 @@ 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 @@ 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 Index: process.c =================================================================== --- process.c (revision 22395) +++ process.c (revision 22396) @@ -2486,10 +2486,10 @@ 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 Index: random.c =================================================================== --- random.c (revision 22395) +++ random.c (revision 22396) @@ -297,7 +297,7 @@ #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); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/