From 7251ea56f6b954bfa5d08f7818d60a6788ddbde3 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Thu, 16 Feb 2017 20:04:59 +0800 Subject: [PATCH] kv: silence the gcc warning of func foo was hidden MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this silences the warnings like ceph/ceph/src/kv/KeyValueDB.h:59:18: warning: ‘virtual void KeyValueDB::TransactionImpl::set(const string&, const char*, size_t, const bufferlist&)’ was hidden [-Woverloaded-\ virtual] virtual void set( ^~~ Signed-off-by: Kefu Chai --- src/kv/LevelDBStore.h | 6 +++++- src/kv/MemDB.h | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/kv/LevelDBStore.h b/src/kv/LevelDBStore.h index 69f03ce75d7..ce55bf41bbe 100644 --- a/src/kv/LevelDBStore.h +++ b/src/kv/LevelDBStore.h @@ -190,12 +190,14 @@ public: const string &prefix, const string &k, const bufferlist &bl); + using KeyValueDB::TransactionImpl::set; void rmkey( const string &prefix, const string &k); void rmkeys_by_prefix( const string &prefix ); + using KeyValueDB::TransactionImpl::rmkey; }; KeyValueDB::Transaction get_transaction() { @@ -213,7 +215,9 @@ public: int get(const string &prefix, const string &key, bufferlist *value); - + + using KeyValueDB::get; + class LevelDBWholeSpaceIteratorImpl : public KeyValueDB::WholeSpaceIteratorImpl { protected: diff --git a/src/kv/MemDB.h b/src/kv/MemDB.h index 715b0a12762..565b94a7fa6 100644 --- a/src/kv/MemDB.h +++ b/src/kv/MemDB.h @@ -86,7 +86,9 @@ public: void set(const std::string &prefix, const std::string &key, const bufferlist &val); + using KeyValueDB::TransactionImpl::set; void rmkey(const std::string &prefix, const std::string &k); + using KeyValueDB::TransactionImpl::rmkey; void rmkeys_by_prefix(const std::string &prefix); void merge(const std::string &prefix, const std::string &key, const bufferlist &value); @@ -127,11 +129,13 @@ public: int submit_transaction_sync(Transaction); int get(const std::string &prefix, const std::set &key, - std::map *out); + std::map *out) override; int get(const std::string &prefix, const std::string &key, bufferlist *out) override; + using KeyValueDB::get; + class MDBWholeSpaceIteratorImpl : public KeyValueDB::WholeSpaceIteratorImpl { mdb_iter_t m_iter;