Skip to content

Commit

Permalink
make linters happy
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
  • Loading branch information
ahcorde committed Aug 30, 2024
1 parent 78a36c2 commit 31b712e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion rmw_zenoh_cpp/src/detail/zenoh_router_check.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ rmw_ret_t zenoh_router_check(z_session_t session)
rmw_ret_t ret = RMW_RET_OK;
// z_owned_closure_zid_t router_callback = z_closure(callback, nullptr /* drop */, &context);
z_owned_closure_zid_t router_callback;
router_callback.context = (void *)&context;
router_callback.context = static_cast<void *>(&context);
router_callback.call = callback;
router_callback.drop = nullptr;

Expand Down
2 changes: 1 addition & 1 deletion rmw_zenoh_cpp/src/rmw_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ rmw_init(const rmw_init_options_t * options, rmw_context_t * context)
auto sub_options = zc_liveliness_subscriber_options_null();
// z_owned_closure_sample_t callback = z_closure(graph_sub_data_handler, nullptr, context->impl);
z_owned_closure_sample_t callback;
callback.context = (void *)context->impl;
callback.context = static_cast<void *>(context->impl);
callback.call = graph_sub_data_handler;
callback.drop = nullptr;

Expand Down
11 changes: 6 additions & 5 deletions rmw_zenoh_cpp/src/rmw_zenoh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1445,11 +1445,12 @@ rmw_create_subscription(
allocator->deallocate(type_hash_c_str, allocator->state);
});

// Everything above succeeded and is setup properly. Now declare a subscriber
// Everything above succeeded and is setup properly. Now declare a subscriber
// with Zenoh; after this, callbacks may come in at any time.
// z_owned_closure_sample_t callback = z_closure(rmw_zenoh_cpp::sub_data_handler, nullptr, sub_data);
// z_owned_closure_sample_t callback = z_closure(
// rmw_zenoh_cpp::sub_data_handler, nullptr, sub_data);
z_owned_closure_sample_t callback;
callback.context = (void *)sub_data;
callback.context = static_cast<void *>(sub_data);
callback.call = rmw_zenoh_cpp::sub_data_handler;
callback.drop = nullptr;
z_owned_keyexpr_t keyexpr = ros_topic_name_to_zenoh_key(
Expand Down Expand Up @@ -2501,7 +2502,7 @@ rmw_send_request(
// z_owned_closure_reply_t zn_closure_reply =
// z_closure(rmw_zenoh_cpp::client_data_handler, rmw_zenoh_cpp::client_data_drop, client_data);
z_owned_closure_reply_t zn_closure_reply;
zn_closure_reply.context = (void *)client_data;
zn_closure_reply.context = static_cast<void *>(client_data);
zn_closure_reply.call = rmw_zenoh_cpp::client_data_handler;
zn_closure_reply.drop = rmw_zenoh_cpp::client_data_drop;
z_get(
Expand Down Expand Up @@ -2877,7 +2878,7 @@ rmw_create_service(
// rmw_zenoh_cpp::service_data_handler, nullptr,
// service_data);
z_owned_closure_query_t callback;
callback.context = (void *)service_data;
callback.context = static_cast<void *>(service_data);
callback.call = rmw_zenoh_cpp::service_data_handler;
callback.drop = nullptr;
// Configure the queryable to process complete queries.
Expand Down

0 comments on commit 31b712e

Please sign in to comment.