Skip to content

Commit ebe2527

Browse files
committed
Merge pull request XRPLF#94 from yumiOS/modify_ftruncate_warning
Modify the compile error about ftruncate()
2 parents eec8695 + 056a028 commit ebe2527

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

util/env_posix.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,8 @@ class PosixWritableFile : public WritableFile {
688688
GetPreallocationStatus(&block_size, &last_allocated_block);
689689
if (last_allocated_block > 0) {
690690
// trim the extra space preallocated at the end of the file
691-
ftruncate(fd_, filesize_); // ignore errors
691+
int dummy __attribute__((unused));
692+
dummy = ftruncate(fd_, filesize_); // ignore errors
692693
}
693694

694695
if (close(fd_) < 0) {

0 commit comments

Comments
 (0)