]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os: cast pointers to void* before printing them
authorKefu Chai <kchai@redhat.com>
Wed, 9 Sep 2020 03:26:58 +0000 (11:26 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 9 Sep 2020 05:27:25 +0000 (13:27 +0800)
to address the FTBFS like:

../src/crimson/os/seastore/lba_manager/btree/btree_range_pin.cc:110:14:   required from here
/usr/include/fmt/core.h:902:19: error: static assertion failed: formatting of non-void pointers is disallowed
  902 |     static_assert(!sizeof(T), "formatting of non-void pointers is disallowed");
      |                   ^~~~~~~~~~

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/os/seastore/lba_manager/btree/btree_range_pin.cc
src/test/crimson/test_messenger.cc

index 96308a91337fe19faea1f0394a4badd131cc7465..38edff530f9ecaae65213eea180e054f467aeb02 100644 (file)
@@ -102,10 +102,12 @@ void btree_pin_set_t::add_pin(btree_range_pin_t &pin)
     auto *parent = maybe_get_parent(pin.range);
     assert(parent);
     if (!parent->has_ref()) {
-      logger().debug("{}: acquiring parent {}", __func__, parent);
+      logger().debug("{}: acquiring parent {}", __func__,
+                    static_cast<void*>(parent));
       parent->acquire_ref();
     } else {
-      logger().debug("{}: parent has ref {}", __func__, parent);
+      logger().debug("{}: parent has ref {}", __func__,
+                    static_cast<void*>(parent));
     }
   }
   if (maybe_get_first_child(pin.range) != nullptr) {
index 43a0e688ee4bdd46d7c25139cfc6f6df5f93f811..5a826b591e23b98ea14a1e49714d3e1c7bf02c91 100644 (file)
@@ -599,7 +599,7 @@ struct ConnResult {
                   "  cnt_accept_dispatched: {}\n"
                   "  cnt_reset_dispatched: {}\n"
                   "  cnt_remote_reset_dispatched: {}\n",
-                  this,
+                  static_cast<const void*>(this),
                   index, *conn,
                   state,
                   connect_attempts,