From 17be187ff9f57dede2ee152f07a17a1d100fd4cb Mon Sep 17 00:00:00 2001 From: Lei Jin Date: Wed, 29 Oct 2014 15:38:34 -0700 Subject: [PATCH] dummy var to suppress compiler warning/error 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 --- util/env_posix.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/env_posix.cc b/util/env_posix.cc index 84c9e558e..e44ebc83e 100644 --- a/util/env_posix.cc +++ b/util/env_posix.cc @@ -739,7 +739,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