From f13bf44e87573bde9fd8f609eddaec804257596f Mon Sep 17 00:00:00 2001 From: Rich Scott Date: Mon, 1 Dec 2008 16:53:34 -0700 Subject: [PATCH] Check return value of fwrite() calls. This is to satisfy GCC 4.3.2 (on Ubuntu 8.10), which requires it. --- src/heapdump.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/heapdump.cpp b/src/heapdump.cpp index 617d1d2e74..e8105c974a 100644 --- a/src/heapdump.cpp +++ b/src/heapdump.cpp @@ -215,21 +215,21 @@ get(object o, unsigned offsetInWords) void write1(Context* c, uint8_t v) { - fwrite(&v, 1, 1, c->out); + size_t n UNUSED = fwrite(&v, 1, 1, c->out); } void write4(Context* c, uint32_t v) { uint8_t b[] = { v >> 24, (v >> 16) & 0xFF, (v >> 8) & 0xFF, v & 0xFF }; - fwrite(b, 4, 1, c->out); + size_t n UNUSED = fwrite(b, 4, 1, c->out); } void writeString(Context* c, int8_t* p, unsigned size) { write4(c, size); - fwrite(p, size, 1, c->out); + size_t n UNUSED = fwrite(p, size, 1, c->out); } unsigned