]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
src/kv/MemDB.cc: the type of the parameter of push_back() does not match the ops... 10455/head
authorWillem Jan Withagen <wjw@digiware.nl>
Wed, 27 Jul 2016 16:18:55 +0000 (18:18 +0200)
committerWillem Jan Withagen <wjw@digiware.nl>
Thu, 28 Jul 2016 22:34:31 +0000 (00:34 +0200)
 - NULL is a C-type usage, which is allow by GCC.
   But Clang is more strict 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 <wjw@digiware.nl>
src/kv/MemDB.cc

index 49205e40a2788ec731ffcc48a9a1aeba52f5f154..b7d1a253dc6a824f193e12b34cfb99ddbdf3882e 100644 (file)
@@ -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)