diff options
author | Ronen Friedman <rfriedma@redhat.com> | 2024-02-16 19:57:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-16 19:57:45 +0100 |
commit | 0ed764e6499003b2b2b6ce9e2ae4edca7a7b16f5 (patch) | |
tree | df0c62f71b3949023a66bec2ee051a413e6b73d1 | |
parent | Merge pull request #54922 from pponnuvel/disable_network_stats (diff) | |
parent | osd: avoid copying chunks in a loop (diff) | |
download | ceph-0ed764e6499003b2b2b6ce9e2ae4edca7a7b16f5.tar.xz ceph-0ed764e6499003b2b2b6ce9e2ae4edca7a7b16f5.zip |
Merge pull request #55605 from ronen-fr/wip-rf-warns0224
osd: clean compiler warnings
Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
-rw-r--r-- | src/osd/PrimaryLogPG.cc | 5 | ||||
-rw-r--r-- | src/test/crush/crush.cc | 5 |
2 files changed, 2 insertions, 8 deletions
diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index a6922756236..214b8c533ae 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -10506,7 +10506,7 @@ int PrimaryLogPG::start_dedup(OpRequestRef op, ObjectContextRef obc) obc_g ? &(obc_g->obs.oi.manifest) : nullptr, refs); - for (auto p : chunks) { + for (const auto& p : chunks) { hobject_t target = mop->new_manifest.chunk_map[p.first].oid; if (refs.find(target) == refs.end()) { continue; @@ -11534,7 +11534,7 @@ void PrimaryLogPG::submit_log_entries( } pgbackend->call_write_ordered( - [this, entries, repop, on_complete]() { + [this, entries, repop, on_complete]() mutable { ObjectStore::Transaction t; eversion_t old_last_update = info.last_update; recovery_state.merge_new_log_entries( @@ -12112,7 +12112,6 @@ int PrimaryLogPG::find_object_context(const hobject_t& oid, dout(20) << __func__ << " " << soid << " snapset " << obc->ssc->snapset << dendl; - snapid_t first, last; auto p = obc->ssc->snapset.clone_snaps.find(soid.snap); ceph_assert(p != obc->ssc->snapset.clone_snaps.end()); if (p->second.empty()) { diff --git a/src/test/crush/crush.cc b/src/test/crush/crush.cc index 2be7d5540d8..c9f670a9e32 100644 --- a/src/test/crush/crush.cc +++ b/src/test/crush/crush.cc @@ -337,11 +337,6 @@ TEST_P(IndepTest, out_progressive) { if (i > 0) cout << "marked out " << i - 1 << " "; cout << x << " -> " << out << std::endl; - int num_none = 0; - for (unsigned k=0; k<out.size(); ++k) { - if (out[k] == CRUSH_ITEM_NONE) - num_none++; - } ASSERT_EQ(0, get_num_dups(out)); // make sure nothing moved |