From 0ecefdecc766f1e7d573fc07e888e315bd53dd3f Mon Sep 17 00:00:00 2001 From: Willem Jan Withagen Date: Wed, 27 Jul 2016 18:18:55 +0200 Subject: [PATCH] src/kv/MemDB.cc: Clang complains about using NULL as empty bufferlist. - NULL is a C-type usage, which is allow by GCC. But Clang is more strick in checking. Error looks like: src/kv/MemDB.cc:228: error: no matching member function for call to 'push_back' ops.push_back(make_pair(DELETE, ~~~~^~~~~~~~~ /usr/include/c++/v1/vector:685:36: note: candidate function not viable: no known conversion from 'pair<[...], pair<[...], nullptr_t>>' to 'const pair<[...], pair<[...], ceph::buffer::list>>' for 1st argument _LIBCPP_INLINE_VISIBILITY void push_back(const_reference __x); ^ Signed-off-by: Willem Jan Withagen --- src/kv/MemDB.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kv/MemDB.cc b/src/kv/MemDB.cc index 49205e40a2788..b7d1a253dc6a8 100644 --- a/src/kv/MemDB.cc +++ b/src/kv/MemDB.cc @@ -227,7 +227,7 @@ void MemDB::MDBTransactionImpl::rmkey(const string &prefix, dtrace << __func__ << " " << prefix << " " << k << dendl; ops.push_back(make_pair(DELETE, std::make_pair(std::make_pair(prefix, k), - NULL))); + bufferlist()))); } void MemDB::MDBTransactionImpl::rmkeys_by_prefix(const string &prefix)