Merge pull request #94 from yumiOS/modify_ftruncate_warning
Modify the compile error about ftruncate()
This commit is contained in:
commit
ebe2527f9a
@ -688,7 +688,8 @@ class PosixWritableFile : public WritableFile {
|
|||||||
GetPreallocationStatus(&block_size, &last_allocated_block);
|
GetPreallocationStatus(&block_size, &last_allocated_block);
|
||||||
if (last_allocated_block > 0) {
|
if (last_allocated_block > 0) {
|
||||||
// trim the extra space preallocated at the end of the file
|
// 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) {
|
if (close(fd_) < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user