diff --git a/util/env_posix.cc b/util/env_posix.cc index ef7655e608e534a46000eae7c41e7e7c027ad623..e019d6af095c85c62b4fa04e28bec09cac6c06ce 100644 --- a/util/env_posix.cc +++ b/util/env_posix.cc @@ -688,7 +688,8 @@ class PosixWritableFile : public WritableFile { GetPreallocationStatus(&block_size, &last_allocated_block); if (last_allocated_block > 0) { // trim the extra space preallocated at the end of the file - ftruncate(fd_, filesize_); // ignore errors + int dummy __attribute__((unused)); + dummy = ftruncate(fd_, filesize_); // ignore errors } if (close(fd_) < 0) {