]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: clean compiler warnings
authorRonen Friedman <rfriedma@redhat.com>
Thu, 15 Feb 2024 18:11:22 +0000 (12:11 -0600)
committerRonen Friedman <rfriedma@redhat.com>
Thu, 15 Feb 2024 18:11:22 +0000 (12:11 -0600)
... for unused variables, for code that has no effect, and
for trying to std::move out of a const lvalue.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/osd/PrimaryLogPG.cc
src/test/crush/crush.cc

index ca83a563e4f8d2ee60b917af8689857af6d7a282..6e6e081444e55f2304ea6aab1c2effb0f9beb832 100644 (file)
@@ -11531,7 +11531,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(
@@ -12109,7 +12109,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()) {
index 2be7d5540d8dcbfb7e7865fd856fa3319a56cd14..c9f670a9e322a233c615349f2c6808b5aa755c16 100644 (file)
@@ -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