1. src/osd/PrimaryLogPG.cc:
It's safe to use clear() on operand that has been moved.
reference: https://github.com/ceph/ceph/pull/48839/files
2. src/osdc/Striper.cc:
This is a false-positive because in the loop the bufferlist is only being moved when the size of the buffer_extents is equal to 1 otherwise it will not move
reference: https://github.com/ceph/ceph/blob/
e879ce83c084f1a96e5dd0ab2b57bf909cfa423d/src/osdc/Striper.cc#L411-L415
Signed-off-by: Suyash Dongre <suyashd999@gmail.com>
encode(snapset, bl);
attrs[SS_ATTR] = std::move(bl);
- bl.clear();
+ bl.clear(); //NOLINT(bugprone-use-after-move)
encode(head_obc->obs.oi, bl,
get_osdmap()->get_features(CEPH_ENTITY_TYPE_OSD, nullptr));
attrs[OI_ATTR] = std::move(bl);
<< " to " << buffer_extents << dendl;
for (auto& be : buffer_extents) {
auto& r = partial[be.first];
- size_t actual = std::min<uint64_t>(bl.length(), be.second);
+ size_t actual = std::min<uint64_t>(bl.length(), be.second); //NOLINT(bugprone-use-after-move)
if (buffer_extents.size() == 1) {
r.first = std::move(bl);
} else {