Skip to content

Commit

Permalink
src/kv/MemDB.cc: Clang complains about using NULL as empty bufferlist.
Browse files Browse the repository at this point in the history
 - 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 <wjw@digiware.nl>
  • Loading branch information
wjwithagen committed Jul 28, 2016
1 parent 80fcbb6 commit 0ecefde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/kv/MemDB.cc
Expand Up @@ -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)
Expand Down

0 comments on commit 0ecefde

Please sign in to comment.