From de5b4605b6e5c3f19d9be9f32f1782ec488879d2 Mon Sep 17 00:00:00 2001 From: "ager@chromium.org" Date: Sat, 28 Feb 2009 13:59:55 +0000 Subject: [PATCH] Check the return value of fwrite. Newer versions of glib stdio mark fwrite() with war_unused_result. Commiting for estade@chromium.org. See http://codereview.chromium.org/27305 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1392 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/log.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/log.cc b/src/log.cc index ea81b817c6..ed8f475250 100644 --- a/src/log.cc +++ b/src/log.cc @@ -386,7 +386,9 @@ void LogMessageBuilder::AppendDetailed(String* str, bool show_impl_info) { // Write the log message to the log file currently opened. void LogMessageBuilder::WriteToLogFile() { ASSERT(pos_ <= Logger::kMessageBufferSize); - fwrite(Logger::message_buffer_, 1, pos_, Logger::logfile_); + size_t rv = fwrite(Logger::message_buffer_, 1, pos_, Logger::logfile_); + ASSERT(rv == static_cast(pos_)); + USE(rv); } #endif