From cf51d3eb7323368544ce4d4158f2ea51e18d47a7 Mon Sep 17 00:00:00 2001 From: Aliaksei Sandryhaila Date: Mon, 2 Oct 2017 15:11:40 -0700 Subject: [PATCH] Remove an "unused" variable Summary: PR 2893 introduced a variable that is only used in TEST_SYNC_POINT_CALLBACK. When RocksDB is not built in debug mode, this method is not compiled in, and the variable is unused, which triggers a compiler error. This patch reverts the corresponding part of #2893. Closes https://github.com/facebook/rocksdb/pull/2956 Reviewed By: yiwu-arbug Differential Revision: D5955679 Pulled By: asandryh fbshipit-source-id: ac4a8e85b22da7f02efb117cd2e4a6e07ba73390 --- db/compaction_job.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/compaction_job.cc b/db/compaction_job.cc index 2e4bb367b..c74223308 100644 --- a/db/compaction_job.cc +++ b/db/compaction_job.cc @@ -1260,9 +1260,11 @@ Status CompactionJob::OpenCompactionOutputFile( #endif // !ROCKSDB_LITE // Make the output file unique_ptr writable_file; +#ifndef NDEBUG bool syncpoint_arg = env_options_.use_direct_writes; TEST_SYNC_POINT_CALLBACK("CompactionJob::OpenCompactionOutputFile", &syncpoint_arg); +#endif Status s = NewWritableFile(env_, fname, &writable_file, env_options_); if (!s.ok()) { ROCKS_LOG_ERROR( -- GitLab