* io.c (rb_write_error2): suppress unused variable warning.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2011-11-29 00:58:28 +00:00
Родитель 9fe88af9ef
Коммит 82d138f749
2 изменённых файлов: 10 добавлений и 4 удалений

Просмотреть файл

@ -1,3 +1,7 @@
Tue Nov 29 09:58:23 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* io.c (rb_write_error2): suppress unused variable warning.
Tue Nov 29 07:45:26 2011 Eric Hodel <drbrain@segment7.net>
* lib/mkmf.rb: Wrap comments to 78 columns and clean up formatting.
@ -12,11 +16,11 @@ Tue Nov 29 05:54:18 2011 Eric Hodel <drbrain@segment7.net>
Tue Nov 29 00:08:57 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
* common.mk (INSTRUBY_ARGS): added --mantype to apply mdoc2man.rb
to man pages. Fixes #5598.
to man pages. Fixes #5598.
(do-install-nodoc, do-install-local, do-install-man,
dont-install-nodoc, dont-install-local, dont-install-man):
No longer needs --mantype.
Reported by Rainer Orth <ro AT cebitec.uni-bielefeld.de>,
patch by George Koehler <xkernigh AT netscape.net>.

6
io.c
Просмотреть файл

@ -6599,8 +6599,10 @@ void
rb_write_error2(const char *mesg, long len)
{
if (rb_stderr == orig_stderr || RFILE(orig_stderr)->fptr->fd < 0) {
ssize_t unused;
unused = fwrite(mesg, sizeof(char), len, stderr);
if (fwrite(mesg, sizeof(char), (size_t)len, stderr) < (size_t)len) {
/* failed to write to stderr, what can we do? */
return;
}
}
else {
rb_io_write(rb_stderr, rb_str_new(mesg, len));