summaryrefslogtreecommitdiff
path: root/vm_dump.c
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-27 12:06:10 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-27 12:06:10 +0000
commit8cee31214df54281a93c8fe135a5fd36fd7e288a (patch)
treec9cbea25ec37f42d53ddd34541fd254132c6f684 /vm_dump.c
parent9b58c2edf3dbb9adc4355e642e4124eeb47a43d5 (diff)
* io.c (rb_write_error2): get rid of warning on linux. fwrite
of glibc is tagged __attribute__ ((__warn_unused_result__)) if _FORTIFY_SOURCE != 0. * vm_dump.c (rb_vm_bugreport): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_dump.c')
-rw-r--r--vm_dump.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vm_dump.c b/vm_dump.c
index 1e59919..2ace3a5 100644
--- a/vm_dump.c
+++ b/vm_dump.c
@@ -863,7 +863,8 @@ rb_vm_bugreport(void)
while (!feof(fp)) {
char buff[0x100];
size_t rn = fread(buff, 1, 0x100, fp);
- fwrite(buff, 1, rn, stderr);
+ if (fwrite(buff, 1, rn, stderr) != rn)
+ break;
}
fclose(fp);