From b0980ff7486b3a56c345e8b94d3c2ad655c039e6 Mon Sep 17 00:00:00 2001 From: Alex Loukissas Date: Mon, 26 Oct 2015 16:00:51 -0700 Subject: [PATCH] Fix unused parameter warnings. --- include/rocksdb/db.h | 18 ++++++++++-------- include/rocksdb/listener.h | 13 ++++++------- include/rocksdb/table_properties.h | 7 +++---- include/rocksdb/write_batch.h | 8 ++++---- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/include/rocksdb/db.h b/include/rocksdb/db.h index e760f409e2..24c372a545 100644 --- a/include/rocksdb/db.h +++ b/include/rocksdb/db.h @@ -258,9 +258,10 @@ class DB { // This check is potentially lighter-weight than invoking DB::Get(). One way // to make this lighter weight is to avoid doing any IOs. // Default implementation here returns true and sets 'value_found' to false - virtual bool KeyMayExist(const ReadOptions& options, - ColumnFamilyHandle* column_family, const Slice& key, - std::string* value, bool* value_found = nullptr) { + virtual bool KeyMayExist(const ReadOptions& /*options*/, + ColumnFamilyHandle* /*column_family*/, + const Slice& /*key*/, std::string* /*value*/, + bool* value_found = nullptr) { if (value_found != nullptr) { *value_found = false; } @@ -502,8 +503,8 @@ class DB { return CompactRange(options, DefaultColumnFamily(), begin, end); } - virtual Status SetOptions(ColumnFamilyHandle* column_family, - const std::unordered_map& new_options) { + virtual Status SetOptions(ColumnFamilyHandle* /*column_family*/, + const std::unordered_map& /*new_options*/) { return Status::NotSupported("Not implemented"); } virtual Status SetOptions( @@ -653,7 +654,8 @@ class DB { // Returns a list of all table files with their level, start key // and end key - virtual void GetLiveFilesMetaData(std::vector* metadata) {} + virtual void GetLiveFilesMetaData( + std::vector* /*metadata*/) {} // Obtains the meta data of the specified column family of the DB. // Status::NotFound() will be returned if the current DB does not have @@ -662,8 +664,8 @@ class DB { // If cf_name is not specified, then the metadata of the default // column family will be returned. virtual void GetColumnFamilyMetaData( - ColumnFamilyHandle* column_family, - ColumnFamilyMetaData* metadata) {} + ColumnFamilyHandle* /*column_family*/, + ColumnFamilyMetaData* /*metadata*/) {} // Get the metadata of the default column family. void GetColumnFamilyMetaData( diff --git a/include/rocksdb/listener.h b/include/rocksdb/listener.h index ba98c894db..69bfd62aee 100644 --- a/include/rocksdb/listener.h +++ b/include/rocksdb/listener.h @@ -150,8 +150,8 @@ class EventListener { // Note that the this function must be implemented in a way such that // it should not run for an extended period of time before the function // returns. Otherwise, RocksDB may be blocked. - virtual void OnFlushCompleted( - DB* db, const FlushJobInfo& flush_job_info) {} + virtual void OnFlushCompleted(DB* /*db*/, + const FlushJobInfo& /*flush_job_info*/) {} // A call-back function for RocksDB which will be called whenever // a SST file is deleted. Different from OnCompactionCompleted and @@ -164,8 +164,7 @@ class EventListener { // Note that if applications would like to use the passed reference // outside this function call, they should make copies from the // returned value. - virtual void OnTableFileDeleted( - const TableFileDeletionInfo& info) {} + virtual void OnTableFileDeleted(const TableFileDeletionInfo& /*info*/) {} // A call-back function for RocksDB which will be called whenever // a registered RocksDB compacts a file. The default implementation @@ -180,7 +179,8 @@ class EventListener { // @param ci a reference to a CompactionJobInfo struct. 'ci' is released // after this function is returned, and must be copied if it is needed // outside of this function. - virtual void OnCompactionCompleted(DB *db, const CompactionJobInfo& ci) {} + virtual void OnCompactionCompleted(DB* /*db*/, + const CompactionJobInfo& /*ci*/) {} // A call-back function for RocksDB which will be called whenever // a SST file is created. Different from OnCompactionCompleted and @@ -193,8 +193,7 @@ class EventListener { // Note that if applications would like to use the passed reference // outside this function call, they should make copies from these // returned value. - virtual void OnTableFileCreated( - const TableFileCreationInfo& info) {} + virtual void OnTableFileCreated(const TableFileCreationInfo& /*info*/) {} virtual ~EventListener() {} }; diff --git a/include/rocksdb/table_properties.h b/include/rocksdb/table_properties.h index 45dde779a0..73a825de82 100644 --- a/include/rocksdb/table_properties.h +++ b/include/rocksdb/table_properties.h @@ -107,7 +107,7 @@ class TablePropertiesCollector { // Add() will be called when a new key/value pair is inserted into the table. // @params key the user key that is inserted into the table. // @params value the value that is inserted into the table. - virtual Status Add(const Slice& key, const Slice& value) { + virtual Status Add(const Slice& /*key*/, const Slice& /*value*/) { return Status::InvalidArgument( "TablePropertiesCollector::Add() deprecated."); } @@ -116,10 +116,9 @@ class TablePropertiesCollector { // table. // @params key the user key that is inserted into the table. // @params value the value that is inserted into the table. - // @params file_size file size up to now virtual Status AddUserKey(const Slice& key, const Slice& value, - EntryType type, SequenceNumber seq, - uint64_t file_size) { + EntryType /*type*/, SequenceNumber /*seq*/, + uint64_t /*file_size*/) { // For backwards-compatibility. return Add(key, value); } diff --git a/include/rocksdb/write_batch.h b/include/rocksdb/write_batch.h index a097f2169d..d6c2a5925a 100644 --- a/include/rocksdb/write_batch.h +++ b/include/rocksdb/write_batch.h @@ -147,7 +147,7 @@ class WriteBatch : public WriteBatchBase { return Status::InvalidArgument( "non-default column family and PutCF not implemented"); } - virtual void Put(const Slice& key, const Slice& value) {} + virtual void Put(const Slice& /*key*/, const Slice& /*value*/) {} virtual Status DeleteCF(uint32_t column_family_id, const Slice& key) { if (column_family_id == 0) { @@ -157,7 +157,7 @@ class WriteBatch : public WriteBatchBase { return Status::InvalidArgument( "non-default column family and DeleteCF not implemented"); } - virtual void Delete(const Slice& key) {} + virtual void Delete(const Slice& /*key*/) {} virtual Status SingleDeleteCF(uint32_t column_family_id, const Slice& key) { if (column_family_id == 0) { @@ -167,7 +167,7 @@ class WriteBatch : public WriteBatchBase { return Status::InvalidArgument( "non-default column family and SingleDeleteCF not implemented"); } - virtual void SingleDelete(const Slice& key) {} + virtual void SingleDelete(const Slice& /*key*/) {} // Merge and LogData are not pure virtual. Otherwise, we would break // existing clients of Handler on a source code level. The default @@ -181,7 +181,7 @@ class WriteBatch : public WriteBatchBase { return Status::InvalidArgument( "non-default column family and MergeCF not implemented"); } - virtual void Merge(const Slice& key, const Slice& value) {} + virtual void Merge(const Slice& /*key*/, const Slice& /*value*/) {} // The default implementation of LogData does nothing. virtual void LogData(const Slice& blob);