From 1e0ef76adbb34a8f1b8d42d3409c7205d2fe95f7 Mon Sep 17 00:00:00 2001 From: Ronen Friedman Date: Thu, 15 Feb 2024 12:17:57 -0600 Subject: [PATCH] osd: avoid copying chunks in a loop to clear a static analyzer warning Signed-off-by: Ronen Friedman --- src/osd/PrimaryLogPG.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 6e6e081444e55..54462ab89a863 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -10503,7 +10503,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; -- 2.39.5