]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson,test: remove unused functions and dead variable
authorSun Yuechi <sunyuechi@iscas.ac.cn>
Mon, 15 Jun 2026 19:41:19 +0000 (03:41 +0800)
committerSun Yuechi <sunyuechi@iscas.ac.cn>
Tue, 16 Jun 2026 04:36:11 +0000 (12:36 +0800)
Fixing these warnings:

  src/crimson/os/seastore/seastore.cc:83: 'omaptree_initialize' defined but not used [-Wunused-function]
  src/crimson/osd/replicated_recovery_backend.cc:733: 'nullopt_if_empty' defined but not used [-Wunused-function]
  src/test/rgw/test_rgw_kms_cache.cc:63: 'rethrow' defined but not used [-Wunused-function]
  src/test/librados/test_cxx.cc:215: variable 'cmd' set but not used [-Wunused-but-set-variable]

Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
src/crimson/os/seastore/seastore.cc
src/crimson/osd/replicated_recovery_backend.cc
src/test/librados/test_cxx.cc
src/test/rgw/test_rgw_kms_cache.cc

index 324cf6b0a5a4536c9e629af251c2fee9555115ea..d816527047601c3b9011e1d6c055e5f92f94de9a 100644 (file)
@@ -79,18 +79,6 @@ namespace crimson::os::seastore {
 using crimson::os::seastore::omap_manager::BtreeOMapManager;
 using crimson::os::seastore::log_manager::LogManager;
 
-static OMapManager::initialize_omap_ret
-omaptree_initialize(
-  Transaction& t,
-  BtreeOMapManager& mgr,
-  omap_type_t type,
-  Onode& onode,
-  Device& device)
-{
-  return mgr.initialize_omap(
-    t, onode.get_metadata_hint(device.get_block_size()), type);
-}
-
 class FileMDStore final : public SeaStore::MDStore {
   std::string root;
 public:
index 51d2ceee9576f7a7bb14c7f56e0b4dabd644957c..6d43707e14fbc29c8692867920b270174868cc87 100644 (file)
@@ -730,11 +730,6 @@ ReplicatedRecoveryBackend::read_object_for_push_op(
   }));
 }
 
-static std::optional<std::string> nullopt_if_empty(const std::string& s)
-{
-  return s.empty() ? std::nullopt : std::make_optional(s);
-}
-
 static bool is_too_many_entries_per_chunk(const PushOp* push_op)
 {
   const uint64_t entries_per_chunk =
index 8d153739015304f458a6a4ca315908b1d6e82d2d..48ee8c6424445957a33b261db2b97112045a8dc8 100644 (file)
@@ -212,10 +212,6 @@ std::string set_pool_flags_pp(const std::string &pool_name, librados::Rados &clu
       flags
   );
 
-  char *cmd[2];
-  cmd[0] = (char *)cmdstr.c_str();
-  cmd[1] = NULL;
-
   int ret = cluster.mon_command(std::move(cmdstr), {}, NULL, NULL);
   if (ret) {
     oss << "rados_mon_command osd pool set set_pool_flags_pp failed with error " << ret;
index 7fc3f18fc3412ddd5d829f528ebf76163143da60..758bcc9e7805330bf7122b23b55c7c5384b794c6 100644 (file)
@@ -60,12 +60,6 @@ class TestKMSCacheReaperLifecycle : public ::testing::Test,
       : rgw::kms::KMSCache(g_ceph_context, std::make_unique<FakeKeyring>()) {};
 };
 
-static void rethrow(const std::exception_ptr& eptr) {
-  if (eptr) {
-    std::rethrow_exception(eptr);
-  }
-}
-
 TEST_F(TestKMSCacheReaperLifecycle, Threaded) {
   initialize_ttl_reaper(std::nullopt);
   EXPECT_TRUE(reaper_initialized());