]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: fix FTBFS due to smart-ptr-to-bool conversion in fmt::ptr 50111/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 14 Feb 2023 14:37:30 +0000 (14:37 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 14 Feb 2023 14:37:56 +0000 (14:37 +0000)
```
../src/fmt/include/fmt/format.h: In instantiation of ‘const void* fmt::v9::ptr(T) [with T = seastar::shared_ptr<crimson::net::SocketConnection>]’:
../src/crimson/net/ProtocolV2.cc:1109:72:   required from here
../src/fmt/include/fmt/format.h:3809:37: error: static assertion failed
 3809 |   static_assert(std::is_pointer<T>::value, "");
      |                                     ^~~~~
../src/fmt/include/fmt/format.h:3809:37: note: ‘std::integral_constant<bool, false>::value’ evaluates to false
```

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/net/ProtocolV2.cc

index e987205c1a85eafd1a2ddda0a69264d121f5b3bc..482ee3bc84d57c932f7b72aa5710176502aadfa9 100644 (file)
@@ -1097,7 +1097,7 @@ ProtocolV2::handle_existing_connection(SocketConnectionRef existing_conn)
                  " found existing {}(state={}, gs={}, pgs={}, cs={}, cc={}, sc={})",
                  conn, global_seq, peer_global_seq, connect_seq,
                  client_cookie, server_cookie,
-                 fmt::ptr(existing_conn), get_state_name(existing_proto->state),
+                 fmt::ptr(existing_conn.get()), get_state_name(existing_proto->state),
                  existing_proto->global_seq,
                  existing_proto->peer_global_seq,
                  existing_proto->connect_seq,
@@ -1106,7 +1106,7 @@ ProtocolV2::handle_existing_connection(SocketConnectionRef existing_conn)
 
   if (!validate_peer_name(existing_conn->get_peer_name())) {
     logger().error("{} server_connect: my peer_name doesn't match"
-                   " the existing connection {}, abort", conn, fmt::ptr(existing_conn));
+                   " the existing connection {}, abort", conn, fmt::ptr(existing_conn.get()));
     abort_in_fault();
   }
 
@@ -1362,7 +1362,7 @@ ProtocolV2::server_reconnect()
                    " found existing {}(state={}, gs={}, pgs={}, cs={}, cc={}, sc={})",
                    conn, global_seq, peer_global_seq, reconnect.connect_seq(),
                    reconnect.client_cookie(), reconnect.server_cookie(),
-                   fmt::ptr(existing_conn),
+                   fmt::ptr(existing_conn.get()),
                    get_state_name(existing_proto->state),
                    existing_proto->global_seq,
                    existing_proto->peer_global_seq,
@@ -1372,7 +1372,7 @@ ProtocolV2::server_reconnect()
 
     if (!validate_peer_name(existing_conn->get_peer_name())) {
       logger().error("{} server_reconnect: my peer_name doesn't match"
-                     " the existing connection {}, abort", conn, fmt::ptr(existing_conn));
+                     " the existing connection {}, abort", conn, fmt::ptr(existing_conn.get()));
       abort_in_fault();
     }