Commit 539e5722 authored by Milo Yip's avatar Milo Yip

Merge pull request #421 from simplifi/fwrite_return_check

check return of fwrite to avoid warn_unused_result build failures. Fixed #420. Thank you.
parents d636594c 2a267ff1
......@@ -57,7 +57,11 @@ public:
void Flush() {
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_;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment