Using return value of fwrite in posix_logger.h
Summary: Was causing error(warning) in third-party saying unused result Test Plan: make Reviewers: sheki, dhruba Reviewed By: dhruba Differential Revision: https://reviews.facebook.net/D9447
This commit is contained in:
parent
b1bea58457
commit
48abc06049
@ -111,11 +111,12 @@ class PosixLogger : public Logger {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
fwrite(base, 1, write_size, file_);
|
size_t sz = fwrite(base, 1, write_size, file_);
|
||||||
fflush(file_);
|
assert(sz == write_size);
|
||||||
|
if (sz > 0) {
|
||||||
log_size_ += write_size;
|
fflush(file_);
|
||||||
|
log_size_ += write_size;
|
||||||
|
}
|
||||||
if (base != buffer) {
|
if (base != buffer) {
|
||||||
delete[] base;
|
delete[] base;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user