]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rocksdb/db/deletefile_test.cc
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / rocksdb / db / deletefile_test.cc
index 6b694f443f3ef976052ef1cbddaf8fe0492b4c98..8583535fa48c20b5671094324da2f507217de8b8 100644 (file)
@@ -1,7 +1,7 @@
 //  Copyright (c) 2011-present, Facebook, Inc.  All rights reserved.
-//  This source code is licensed under the BSD-style license found in the
-//  LICENSE file in the root directory of this source tree. An additional grant
-//  of patent rights can be found in the PATENTS file in the same directory.
+//  This source code is licensed under both the GPLv2 (found in the
+//  COPYING file in the root directory) and Apache 2.0 License
+//  (found in the LICENSE.Apache file in the root directory).
 //
 // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
@@ -45,7 +45,7 @@ class DeleteFileTest : public testing::Test {
     options_.max_bytes_for_level_base = 1024*1024*1000;
     options_.WAL_ttl_seconds = 300; // Used to test log files
     options_.WAL_size_limit_MB = 1024; // Used to test log files
-    dbname_ = test::TmpDir() + "/deletefile_test";
+    dbname_ = test::PerThreadDBPath("deletefile_test");
     options_.wal_dir = dbname_ + "/wal_files";
 
     // clean up all the files that might have been there before
@@ -159,7 +159,7 @@ class DeleteFileTest : public testing::Test {
   }
 
   // An empty job to guard all jobs are processed
-  static void GuardFinish(void* arg) {
+  static void GuardFinish(void* /*arg*/) {
     TEST_SYNC_POINT("DeleteFileTest::GuardFinish");
   }
 };
@@ -228,7 +228,7 @@ TEST_F(DeleteFileTest, PurgeObsoleteFilesTest) {
 
   // this time, we keep an iterator alive
   ReopenDB(true);
-  Iterator *itr = 0;
+  Iterator *itr = nullptr;
   CreateTwoLevels();
   itr = db_->NewIterator(ReadOptions());
   db_->CompactRange(compact_options, &first_slice, &last_slice);
@@ -249,7 +249,7 @@ TEST_F(DeleteFileTest, BackgroundPurgeTest) {
   Slice first_slice(first), last_slice(last);
 
   // We keep an iterator alive
-  Iterator* itr = 0;
+  Iterator* itr = nullptr;
   CreateTwoLevels();
   ReadOptions options;
   options.background_purge_on_iterator_cleanup = true;
@@ -289,7 +289,7 @@ TEST_F(DeleteFileTest, BackgroundPurgeCopyOptions) {
   Slice first_slice(first), last_slice(last);
 
   // We keep an iterator alive
-  Iterator* itr = 0;
+  Iterator* itr = nullptr;
   CreateTwoLevels();
   ReadOptions* options = new ReadOptions();
   options->background_purge_on_iterator_cleanup = true;
@@ -500,7 +500,7 @@ int main(int argc, char** argv) {
 #else
 #include <stdio.h>
 
-int main(int argc, char** argv) {
+int main(int /*argc*/, char** /*argv*/) {
   fprintf(stderr,
           "SKIPPED as DBImpl::DeleteFile is not supported in ROCKSDB_LITE\n");
   return 0;