Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: kill warnings #7397

Merged
merged 9 commits into from Feb 1, 2016
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Expand Up @@ -663,7 +663,7 @@ endif(${HAVE_LIBFUSE})
# make rocksdb statically
add_custom_target(build_rocksdb
COMMAND
EXTRA_CXXFLAGS=-fPIC PORTABLE=1 make static_lib
PORTABLE=1 $(MAKE) static_lib EXTRA_CXXFLAGS='-fPIC -Wno-unused-variable'
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/rocksdb
COMMENT "rocksdb building")

Expand Down
2 changes: 1 addition & 1 deletion src/civetweb
Submodule civetweb updated 1 files
+2 −0 src/civetweb.c
19 changes: 5 additions & 14 deletions src/common/WorkQueue.h
Expand Up @@ -126,10 +126,7 @@ class ThreadPool : public md_config_obs_t {
}

protected:
virtual void _process(const list<T*> &) { assert(0); }
virtual void _process(const list<T*> &items, TPHandle &handle) {
_process(items);
}
virtual void _process(const list<T*> &items, TPHandle &handle) = 0;

public:
BatchWorkQueue(string n, time_t ti, time_t sti, ThreadPool* p)
Expand Down Expand Up @@ -257,10 +254,7 @@ class ThreadPool : public md_config_obs_t {
void unlock() {
pool->unlock();
}
virtual void _process(U) { assert(0); }
virtual void _process(U u, TPHandle &) {
_process(u);
}
virtual void _process(U u, TPHandle &) = 0;
};

/** @brief Template by-pointer work queue.
Expand Down Expand Up @@ -293,10 +287,7 @@ class ThreadPool : public md_config_obs_t {

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);
}
virtual void _process(T *t, TPHandle &) = 0;

public:
WorkQueue(string n, time_t ti, time_t sti, ThreadPool* p) : WorkQueue_(n, ti, sti), pool(p) {
Expand Down Expand Up @@ -555,8 +546,8 @@ class GenContextWQ :
_queue.pop_front();
return c;
}
using ThreadPool::WorkQueueVal<GenContext<ThreadPool::TPHandle&>*>::_process;
void _process(GenContext<ThreadPool::TPHandle&> *c, ThreadPool::TPHandle &tp) {
void _process(GenContext<ThreadPool::TPHandle&> *c,
ThreadPool::TPHandle &tp) override {
c->complete(tp);
}
};
Expand Down
4 changes: 2 additions & 2 deletions src/common/obj_bencher.cc
Expand Up @@ -508,8 +508,8 @@ int ObjBencher::write_bench(int secondsToRun,
++data.started;
++data.in_flight;
if (max_objects &&
data.started > (data.object_size * max_objects + data.op_size - 1) /
data.op_size)
data.started > (int)((data.object_size * max_objects + data.op_size - 1) /
data.op_size))
break;
}
lock.Unlock();
Expand Down
2 changes: 1 addition & 1 deletion src/compressor/AsyncCompressor.h
Expand Up @@ -85,7 +85,7 @@ class AsyncCompressor {
}
return item;
}
void _process(Job *item, ThreadPool::TPHandle &handle) {
void _process(Job *item, ThreadPool::TPHandle &) override {
assert(item->status.read() == WORKING);
bufferlist out;
int r;
Expand Down
3 changes: 0 additions & 3 deletions src/include/config-h.in.cmake
Expand Up @@ -276,7 +276,4 @@
/* Defined if curl headers define curl_multi_wait() */
#cmakedefine HAVE_CURL_MULTI_WAIT 1

/* Define to 1 if you have the <execinfo.h> header file. */
#cmakedefine HAVE_EXECINFO_H 1

#endif /* CONFIG_H */
2 changes: 1 addition & 1 deletion src/os/bluestore/BlueFS.cc
Expand Up @@ -728,7 +728,7 @@ int BlueFS::_read(
left = buf->get_buf_remaining(off);
dout(20) << __func__ << " left " << left << " len " << len << dendl;

int r = MIN((int)len, left);
int r = MIN(len, left);
if (outbl) {
bufferlist t;
t.substr_of(buf->bl, off - buf->bl_off, r);
Expand Down
2 changes: 2 additions & 0 deletions src/os/bluestore/BlueRocksEnv.cc
Expand Up @@ -255,6 +255,7 @@ class BlueRocksWritableFile : public rocksdb::WritableFile {
return rocksdb::Status::OK();
}

using rocksdb::WritableFile::RangeSync;
// Sync a file range with disk.
// offset is the starting byte of the file range to be synchronized.
// nbytes specifies the length of the range to be synchronized.
Expand All @@ -273,6 +274,7 @@ class BlueRocksWritableFile : public rocksdb::WritableFile {
}

protected:
using rocksdb::WritableFile::Allocate;
/*
* Pre-allocate space for a file.
*/
Expand Down
3 changes: 1 addition & 2 deletions src/os/bluestore/BlueStore.h
Expand Up @@ -427,11 +427,10 @@ class BlueStore : public ObjectStore {
i->osr->wal_apply_lock.Lock();
return i;
}
void _process(TransContext *i, ThreadPool::TPHandle &handle) {
void _process(TransContext *i, ThreadPool::TPHandle &) override {
store->_wal_apply(i);
i->osr->wal_apply_lock.Unlock();
}
using ThreadPool::WorkQueue<TransContext>::_process;
void _clear() {
assert(wal_queue.empty());
}
Expand Down
16 changes: 14 additions & 2 deletions src/os/filestore/FileStore.h
Expand Up @@ -370,10 +370,9 @@ class FileStore : public JournalingObjectStore,
store->op_queue.pop_front();
return osr;
}
void _process(OpSequencer *osr, ThreadPool::TPHandle &handle) {
void _process(OpSequencer *osr, ThreadPool::TPHandle &handle) override {
store->_do_op(osr, handle);
}
using ThreadPool::WorkQueue<OpSequencer>::_process;
void _process_finish(OpSequencer *osr) {
store->_finish_op(osr);
}
Expand Down Expand Up @@ -529,12 +528,15 @@ class FileStore : public JournalingObjectStore,
int pick_object_revision_lt(ghobject_t& oid) {
return 0;
}
using ObjectStore::exists;
bool exists(const coll_t& cid, const ghobject_t& oid);
using ObjectStore::stat;
int stat(
const coll_t& cid,
const ghobject_t& oid,
struct stat *st,
bool allow_eio = false);
using ObjectStore::read;
int read(
const coll_t& cid,
const ghobject_t& oid,
Expand All @@ -547,6 +549,7 @@ class FileStore : public JournalingObjectStore,
map<uint64_t, uint64_t> *m);
int _do_seek_hole_data(int fd, uint64_t offset, size_t len,
map<uint64_t, uint64_t> *m);
using ObjectStore::fiemap;
int fiemap(const coll_t& cid, const ghobject_t& oid, uint64_t offset, size_t len, bufferlist& bl);

int _touch(const coll_t& cid, const ghobject_t& oid);
Expand Down Expand Up @@ -598,6 +601,8 @@ class FileStore : public JournalingObjectStore,
int snapshot(const string& name);

// attrs
using ObjectStore::getattr;
using ObjectStore::getattrs;
int getattr(const coll_t& cid, const ghobject_t& oid, const char *name, bufferptr &bp);
int getattrs(const coll_t& cid, const ghobject_t& oid, map<string,bufferptr>& aset);

Expand All @@ -619,6 +624,7 @@ class FileStore : public JournalingObjectStore,
const SequencerPosition &spos);

// collections
using ObjectStore::collection_list;
int collection_list(const coll_t& c, ghobject_t start, ghobject_t end,
bool sort_bitwise, int max,
vector<ghobject_t> *ls, ghobject_t *next);
Expand All @@ -630,18 +636,24 @@ class FileStore : public JournalingObjectStore,
bool collection_empty(const coll_t& c);

// omap (see ObjectStore.h for documentation)
using ObjectStore::omap_get;
int omap_get(const coll_t& c, const ghobject_t &oid, bufferlist *header,
map<string, bufferlist> *out);
using ObjectStore::omap_get_header;
int omap_get_header(
const coll_t& c,
const ghobject_t &oid,
bufferlist *out,
bool allow_eio = false);
using ObjectStore::omap_get_keys;
int omap_get_keys(const coll_t& c, const ghobject_t &oid, set<string> *keys);
using ObjectStore::omap_get_values;
int omap_get_values(const coll_t& c, const ghobject_t &oid, const set<string> &keys,
map<string, bufferlist> *out);
using ObjectStore::omap_check_keys;
int omap_check_keys(const coll_t& c, const ghobject_t &oid, const set<string> &keys,
set<string> *out);
using ObjectStore::get_omap_iterator;
ObjectMap::ObjectMapIterator get_omap_iterator(const coll_t& c, const ghobject_t &oid);

int _create_collection(const coll_t& c, const SequencerPosition &spos);
Expand Down
13 changes: 13 additions & 0 deletions src/os/kstore/KStore.h
Expand Up @@ -402,12 +402,15 @@ class KStore : public ObjectStore {

int statfs(struct statfs *buf);

using ObjectStore::exists;
bool exists(const coll_t& cid, const ghobject_t& oid);
using ObjectStore::stat;
int stat(
const coll_t& cid,
const ghobject_t& oid,
struct stat *st,
bool allow_eio = false); // struct stat?
using ObjectStore::read;
int read(
const coll_t& cid,
const ghobject_t& oid,
Expand All @@ -423,25 +426,31 @@ class KStore : public ObjectStore {
bufferlist& bl,
uint32_t op_flags = 0);

using ObjectStore::fiemap;
int fiemap(const coll_t& cid, const ghobject_t& oid, uint64_t offset, size_t len, bufferlist& bl);
using ObjectStore::getattr;
int getattr(const coll_t& cid, const ghobject_t& oid, const char *name, bufferptr& value);
using ObjectStore::getattrs;
int getattrs(const coll_t& cid, const ghobject_t& oid, map<string,bufferptr>& aset);

int list_collections(vector<coll_t>& ls);
bool collection_exists(const coll_t& c);
bool collection_empty(const coll_t& c);

using ObjectStore::collection_list;
int collection_list(const coll_t& cid, ghobject_t start, ghobject_t end,
bool sort_bitwise, int max,
vector<ghobject_t> *ls, ghobject_t *next);

using ObjectStore::omap_get;
int omap_get(
const coll_t& cid, ///< [in] Collection containing oid
const ghobject_t &oid, ///< [in] Object containing omap
bufferlist *header, ///< [out] omap header
map<string, bufferlist> *out /// < [out] Key to value map
);

using ObjectStore::omap_get_header;
/// Get omap header
int omap_get_header(
const coll_t& cid, ///< [in] Collection containing oid
Expand All @@ -450,13 +459,15 @@ class KStore : public ObjectStore {
bool allow_eio = false ///< [in] don't assert on eio
);

using ObjectStore::omap_get_keys;
/// Get keys defined on oid
int omap_get_keys(
const coll_t& cid, ///< [in] Collection containing oid
const ghobject_t &oid, ///< [in] Object containing omap
set<string> *keys ///< [out] Keys defined on oid
);

using ObjectStore::omap_get_values;
/// Get key values
int omap_get_values(
const coll_t& cid, ///< [in] Collection containing oid
Expand All @@ -465,6 +476,7 @@ class KStore : public ObjectStore {
map<string, bufferlist> *out ///< [out] Returned keys and values
);

using ObjectStore::omap_check_keys;
/// Filters keys into out which are defined on oid
int omap_check_keys(
const coll_t& cid, ///< [in] Collection containing oid
Expand All @@ -473,6 +485,7 @@ class KStore : public ObjectStore {
set<string> *out ///< [out] Subset of keys defined on oid
);

using ObjectStore::get_omap_iterator;
ObjectMap::ObjectMapIterator get_omap_iterator(
const coll_t& cid, ///< [in] collection
const ghobject_t &oid ///< [in] object
Expand Down
8 changes: 8 additions & 0 deletions src/os/memstore/MemStore.h
Expand Up @@ -407,6 +407,7 @@ class MemStore : public ObjectStore {
bufferlist& bl,
uint32_t op_flags = 0,
bool allow_eio = false) override;
using ObjectStore::fiemap;
int fiemap(const coll_t& cid, const ghobject_t& oid, uint64_t offset, size_t len, bufferlist& bl);
int getattr(const coll_t& cid, const ghobject_t& oid, const char *name,
bufferptr& value) override;
Expand All @@ -424,17 +425,20 @@ class MemStore : public ObjectStore {
}
bool collection_exists(const coll_t& c);
bool collection_empty(const coll_t& c);
using ObjectStore::collection_list;
int collection_list(const coll_t& cid, ghobject_t start, ghobject_t end,
bool sort_bitwise, int max,
vector<ghobject_t> *ls, ghobject_t *next);

using ObjectStore::omap_get;
int omap_get(
const coll_t& cid, ///< [in] Collection containing oid
const ghobject_t &oid, ///< [in] Object containing omap
bufferlist *header, ///< [out] omap header
map<string, bufferlist> *out /// < [out] Key to value map
);

using ObjectStore::omap_get_header;
/// Get omap header
int omap_get_header(
const coll_t& cid, ///< [in] Collection containing oid
Expand All @@ -443,13 +447,15 @@ class MemStore : public ObjectStore {
bool allow_eio = false ///< [in] don't assert on eio
);

using ObjectStore::omap_get_keys;
/// Get keys defined on oid
int omap_get_keys(
const coll_t& cid, ///< [in] Collection containing oid
const ghobject_t &oid, ///< [in] Object containing omap
set<string> *keys ///< [out] Keys defined on oid
);

using ObjectStore::omap_get_values;
/// Get key values
int omap_get_values(
const coll_t& cid, ///< [in] Collection containing oid
Expand All @@ -458,6 +464,7 @@ class MemStore : public ObjectStore {
map<string, bufferlist> *out ///< [out] Returned keys and values
);

using ObjectStore::omap_check_keys;
/// Filters keys into out which are defined on oid
int omap_check_keys(
const coll_t& cid, ///< [in] Collection containing oid
Expand All @@ -466,6 +473,7 @@ class MemStore : public ObjectStore {
set<string> *out ///< [out] Subset of keys defined on oid
);

using ObjectStore::get_omap_iterator;
ObjectMap::ObjectMapIterator get_omap_iterator(
const coll_t& cid, ///< [in] collection
const ghobject_t &oid ///< [in] object
Expand Down