Fix additional -Wshorten-64-to-32 errros
This commit is contained in:
parent
767777c2bd
commit
1f621e6abc
@ -123,14 +123,15 @@ class PosixLogger : public Logger {
|
||||
// space, pre-allocate more space to avoid overly large
|
||||
// allocations from filesystem allocsize options.
|
||||
const size_t log_size = log_size_;
|
||||
const int last_allocation_chunk =
|
||||
const size_t last_allocation_chunk =
|
||||
((kDebugLogChunkSize - 1 + log_size) / kDebugLogChunkSize);
|
||||
const int desired_allocation_chunk =
|
||||
const size_t desired_allocation_chunk =
|
||||
((kDebugLogChunkSize - 1 + log_size + write_size) /
|
||||
kDebugLogChunkSize);
|
||||
if (last_allocation_chunk != desired_allocation_chunk) {
|
||||
fallocate(fd_, FALLOC_FL_KEEP_SIZE, 0,
|
||||
desired_allocation_chunk * kDebugLogChunkSize);
|
||||
fallocate(
|
||||
fd_, FALLOC_FL_KEEP_SIZE, 0,
|
||||
static_cast<off_t>(desired_allocation_chunk * kDebugLogChunkSize));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user