summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLei Jin <lei@fb.com>2014-10-29 15:38:34 -0700
committerYueh-Hsuan Chiang <yhchiang@fb.com>2014-10-29 23:45:16 -0700
commitb11a617acd2f4b54e05d28f1101d0de6e9fd34e3 (patch)
treeaf5f7ba63cd143fc2a41cdfcc1dcd878d9499e44
parentf96bb67e5e1b7a003e131bf5057d29b8ad3a162e (diff)
dummy var to suppress compiler warning/errorrocksdb-3.6.2
Summary: Revmoed this in D25641, causing compiler complain. put it back Test Plan: make release Reviewers: igor, yhchiang, rven, sdong Reviewed By: sdong Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D27891
-rw-r--r--util/env_posix.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/env_posix.cc b/util/env_posix.cc
index 98d0c3df2..289f70947 100644
--- a/util/env_posix.cc
+++ b/util/env_posix.cc
@@ -738,7 +738,8 @@ class PosixWritableFile : public WritableFile {
// trim the extra space preallocated at the end of the file
// NOTE(ljin): we probably don't want to surface failure as an IOError,
// but it will be nice to log these errors.
- ftruncate(fd_, filesize_);
+ int dummy __attribute__((unused));
+ dummy = ftruncate(fd_, filesize_);
#ifdef ROCKSDB_FALLOCATE_PRESENT
// in some file systems, ftruncate only trims trailing space if the
// new file size is smaller than the current size. Calling fallocate