check return of fwrite to avoid warn_unused_result build failures

This commit is contained in:
Kurt Johnson 2015-09-02 09:29:15 -05:00
parent d636594c97
commit 2a267ff15a

View File

@ -57,7 +57,11 @@ public:
void Flush() { void Flush() {
if (current_ != buffer_) { if (current_ != buffer_) {
fwrite(buffer_, 1, static_cast<size_t>(current_ - buffer_), fp_); size_t result = fwrite(buffer_, 1, static_cast<size_t>(current_ - buffer_), fp_);
if (result < static_cast<size_t>(current_ - buffer_)) {
// failure deliberately ignored at this time
// added to avoid warn_unused_result build errors
}
current_ = buffer_; current_ = buffer_;
} }
} }