From c7c6cc74aa38b59e309b51b893655c8dc3939143 Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Sat, 7 Oct 2023 14:35:10 -0400 Subject: [PATCH] Fix a couple of warnings pointed out by clang. (#133) 1. Add braces around initialization of array elements. 2. Remove an unused structure member. Signed-off-by: Chris Lalancette --- rmw_connextdds_common/include/rmw_connextdds/context.hpp | 2 -- rmw_connextdds_common/src/common/rmw_context.cpp | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/rmw_connextdds_common/include/rmw_connextdds/context.hpp b/rmw_connextdds_common/include/rmw_connextdds/context.hpp index ad93c768..0cd100fc 100644 --- a/rmw_connextdds_common/include/rmw_connextdds/context.hpp +++ b/rmw_connextdds_common/include/rmw_connextdds/context.hpp @@ -176,8 +176,6 @@ struct rmw_context_impl_s rmw_ret_t finalize_participant(); - DDS_DomainParticipantFactory * factory{nullptr}; - /* Manage the memory of the domain tag */ char * domain_tag{nullptr}; diff --git a/rmw_connextdds_common/src/common/rmw_context.cpp b/rmw_connextdds_common/src/common/rmw_context.cpp index 00d90bb6..117c05b3 100644 --- a/rmw_connextdds_common/src/common/rmw_context.cpp +++ b/rmw_connextdds_common/src/common/rmw_context.cpp @@ -301,8 +301,8 @@ rmw_context_impl_s::initialize_discovery_options(DDS_DomainParticipantQos & dp_q // If it's too large then we will send a lot of announcement traffic. // The default number here is picked arbitrarily. const rmw_peer_address_t localhost_peers[2] = { - "32@builtin.udpv4://127.0.0.1", - "32@builtin.shmem://", + {"32@builtin.udpv4://127.0.0.1"}, + {"32@builtin.shmem://"}, }; const auto rc2 = rmw_connextdds_extend_initial_peer_list( localhost_peers,