From: Orit Wasserman Date: Tue, 14 Jul 2015 12:08:26 +0000 (+0200) Subject: Fix "was hidden" compilation warnings X-Git-Tag: v9.1.0~499^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bc348f6b718bab8832097c64928e2cd94e20fe13;p=ceph.git Fix "was hidden" compilation warnings Signed-off-by: Orit Wasserman --- diff --git a/src/common/WorkQueue.h b/src/common/WorkQueue.h index 7c50aae670bc..cf48b81992b2 100644 --- a/src/common/WorkQueue.h +++ b/src/common/WorkQueue.h @@ -102,10 +102,6 @@ public: virtual bool _enqueue(T *) = 0; virtual void _dequeue(T *) = 0; virtual void _dequeue(list *) = 0; - virtual void _process(const list &) { assert(0); } - virtual void _process(const list &items, TPHandle &handle) { - _process(items); - } virtual void _process_finish(const list &) {} // virtual methods from WorkQueue_ below @@ -127,6 +123,12 @@ public: delete (list *)p; } + protected: + virtual void _process(const list &) { assert(0); } + virtual void _process(const list &items, TPHandle &handle) { + _process(items); + } + public: BatchWorkQueue(string n, time_t ti, time_t sti, ThreadPool* p) : WorkQueue_(n, ti, sti), pool(p) { @@ -187,10 +189,6 @@ public: virtual void _enqueue_front(T) = 0; virtual bool _empty() = 0; virtual U _dequeue() = 0; - virtual void _process(U) { assert(0); } - virtual void _process(U u, TPHandle &) { - _process(u); - } virtual void _process_finish(U) {} void *_void_dequeue() { @@ -257,6 +255,10 @@ public: void unlock() { pool->unlock(); } + virtual void _process(U) { assert(0); } + virtual void _process(U u, TPHandle &) { + _process(u); + } }; /** @brief Template by-pointer work queue. @@ -274,11 +276,6 @@ public: virtual void _dequeue(T *) = 0; /// Dequeue a work item and return the original submitted pointer. virtual T *_dequeue() = 0; - /// Process a work item. Called from the worker threads. - virtual void _process(T *t) { assert(0); } - virtual void _process(T *t, TPHandle &) { - _process(t); - } virtual void _process_finish(T *) {} // implementation of virtual methods from WorkQueue_ @@ -292,6 +289,13 @@ public: _process_finish(static_cast(p)); } + protected: + /// Process a work item. Called from the worker threads. + virtual void _process(T *t) { assert(0); } + virtual void _process(T *t, TPHandle &) { + _process(t); + } + public: WorkQueue(string n, time_t ti, time_t sti, ThreadPool* p) : WorkQueue_(n, ti, sti), pool(p) { pool->add_work_queue(this); @@ -453,6 +457,7 @@ public: _queue.pop_front(); return c; } + using WorkQueueVal*>::_process; void _process(GenContext *c, ThreadPool::TPHandle &tp) { c->complete(tp); } @@ -499,6 +504,7 @@ protected: virtual void _process(std::pair item) { item.first->complete(item.second); } + using ThreadPool::WorkQueueVal >::_process; private: list > _queue; }; diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 6d35f97fc533..322b98c79eca 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -779,6 +779,7 @@ protected: }; friend std::ostream &operator<<(ostream& out, const lowprecision_t& v); + using OSDUtilizationDumper::dump_item; virtual void dump_item(const CrushTreeDumper::Item &qi, float &reweight, int64_t kb, @@ -857,6 +858,7 @@ public: } protected: + using OSDUtilizationDumper::dump_item; virtual void dump_item(const CrushTreeDumper::Item &qi, float &reweight, int64_t kb, diff --git a/src/os/FileStore.h b/src/os/FileStore.h index d81e96794a14..2eb58fc39372 100644 --- a/src/os/FileStore.h +++ b/src/os/FileStore.h @@ -363,6 +363,7 @@ private: void _process(OpSequencer *osr, ThreadPool::TPHandle &handle) { store->_do_op(osr, handle); } + using ThreadPool::WorkQueue::_process; void _process_finish(OpSequencer *osr) { store->_finish_op(osr); } @@ -570,6 +571,7 @@ public: void do_force_sync(); void start_sync(Context *onsafe); void sync(); + using JournalingObjectStore::sync; void _flush_op_queue(); void flush(); void sync_and_flush(); diff --git a/src/os/KeyValueStore.h b/src/os/KeyValueStore.h index 94a1408f7f2b..3c857420b5dd 100644 --- a/src/os/KeyValueStore.h +++ b/src/os/KeyValueStore.h @@ -447,6 +447,7 @@ class KeyValueStore : public ObjectStore, store->op_queue.pop_front(); return osr; } + using ThreadPool::WorkQueue::_process; void _process(OpSequencer *osr, ThreadPool::TPHandle &handle) { store->_do_op(osr, handle); } @@ -578,6 +579,7 @@ class KeyValueStore : public ObjectStore, void start_sync() {} void sync() {} + using ObjectStore::sync; void flush() {} void sync_and_flush() {} diff --git a/src/osd/OSD.h b/src/osd/OSD.h index e568505afc04..a5d429fabb44 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -1748,6 +1748,7 @@ private: (*i)->put("PeeringWQ"); } } + using ThreadPool::BatchWorkQueue::_process; void _process_finish(const list &pgs) { for (list::const_iterator i = pgs.begin(); i != pgs.end(); @@ -2124,6 +2125,9 @@ protected: osd->osd_lock.Unlock(); delete c; } + void _process(Command *c, ThreadPool::TPHandle &tp) { + _process(c); + } void _clear() { while (!osd->command_queue.empty()) { Command *c = osd->command_queue.front(); @@ -2179,6 +2183,7 @@ protected: osd->do_recovery(pg, handle); pg->put("RecoveryWQ"); } + using ThreadPool::WorkQueue::_process; void _clear() { while (!osd->recovery_queue.empty()) { PG *pg = osd->recovery_queue.front(); @@ -2233,6 +2238,7 @@ protected: remove_queue.pop_front(); return item; } + using ThreadPool::WorkQueueVal >::_process; void _process(pair, ThreadPool::TPHandle &); void _clear() { remove_queue.clear(); diff --git a/src/osd/ReplicatedBackend.cc b/src/osd/ReplicatedBackend.cc index 5e03aa78f358..2015dd0b6f5e 100644 --- a/src/osd/ReplicatedBackend.cc +++ b/src/osd/ReplicatedBackend.cc @@ -469,6 +469,7 @@ public: expected_write_size); } + using PGBackend::PGTransaction::append; void append( PGTransaction *_to_append ) { diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h index 2dbda17eac05..9c280365da27 100644 --- a/src/osd/ReplicatedPG.h +++ b/src/osd/ReplicatedPG.h @@ -360,9 +360,11 @@ public: const map &get_shard_missing() const { return peer_missing; } + using PGBackend::Listener::get_shard_missing; const map &get_shard_info() const { return peer_info; } + using PGBackend::Listener::get_shard_info; const pg_missing_t &get_local_missing() const { return pg_log.get_missing(); } diff --git a/src/rgw/rgw_main.cc b/src/rgw/rgw_main.cc index caab642327c5..7e83404e49fb 100644 --- a/src/rgw/rgw_main.cc +++ b/src/rgw/rgw_main.cc @@ -214,6 +214,7 @@ protected: perfcounter->inc(l_rgw_qlen, -1); return req; } + using ThreadPool::WorkQueue::_process; void _process(RGWRequest *req) { perfcounter->inc(l_rgw_qactive); process->handle_request(req); diff --git a/src/rgw/rgw_rest_s3.h b/src/rgw/rgw_rest_s3.h index 1a92a8c2257f..5db03dadc950 100644 --- a/src/rgw/rgw_rest_s3.h +++ b/src/rgw/rgw_rest_s3.h @@ -372,7 +372,8 @@ public: virtual ~RGWHandler_ObjStore_S3() {} int validate_bucket_name(const string& bucket, bool relaxed_names); - + using RGWHandler_ObjStore::validate_bucket_name; + virtual int init(RGWRados *store, struct req_state *state, RGWClientIO *cio); virtual int authorize() { return RGW_Auth_S3::authorize(store, s); @@ -441,9 +442,6 @@ public: RGWRESTMgr_S3() {} virtual ~RGWRESTMgr_S3() {} - virtual RGWRESTMgr *get_resource_mgr(struct req_state *s, const string& uri) { - return this; - } virtual RGWHandler *get_handler(struct req_state *s); }; diff --git a/src/rgw/rgw_rest_swift.h b/src/rgw/rgw_rest_swift.h index 20c742a82806..22283e468a0d 100644 --- a/src/rgw/rgw_rest_swift.h +++ b/src/rgw/rgw_rest_swift.h @@ -235,9 +235,6 @@ public: RGWRESTMgr_SWIFT() {} virtual ~RGWRESTMgr_SWIFT() {} - virtual RGWRESTMgr *get_resource_mgr(struct req_state *s, const string& uri) { - return this; - } virtual RGWHandler *get_handler(struct req_state *s); }; diff --git a/src/test/bench/dumb_backend.h b/src/test/bench/dumb_backend.h index 218e46c2fe8b..b3a19a7b9367 100644 --- a/src/test/bench/dumb_backend.h +++ b/src/test/bench/dumb_backend.h @@ -84,6 +84,7 @@ class DumbBackend : public Backend { bool _empty() { return item_queue.empty(); } + using ThreadPool::WorkQueue::_process; void _process(write_item *item) { return backend->_write( item->oid, diff --git a/src/test/bench/tp_bench.cc b/src/test/bench/tp_bench.cc index b9d5ff17c8f8..23185a769777 100644 --- a/src/test/bench/tp_bench.cc +++ b/src/test/bench/tp_bench.cc @@ -93,6 +93,7 @@ class PassAlong : public ThreadPool::WorkQueue { q.pop_front(); return val; } + using ThreadPool::WorkQueue::_process; void _process(unsigned *item) { next->queue(item); }