]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
dummy var to suppress compiler warning/error rocksdb-3.6.2
authorLei Jin <lei@fb.com>
Wed, 29 Oct 2014 22:38:34 +0000 (15:38 -0700)
committerYueh-Hsuan Chiang <yhchiang@fb.com>
Thu, 30 Oct 2014 06:45:16 +0000 (23:45 -0700)
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

index 98d0c3df293e7bc40be6b25f66acbc4fa80bd212..289f70947616bd90be9a343384e8c5801805b881 100644 (file)
@@ -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