From 291ed0433e9af7b8eac9fa5f71a16add078d962d Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Tue, 11 Jun 2024 17:11:30 +0200 Subject: [PATCH 1/2] Refs #21120: Fix build warning wihtout security Signed-off-by: JesusPoderoso --- src/cpp/rtps/builtin/discovery/endpoint/EDP.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpp/rtps/builtin/discovery/endpoint/EDP.cpp b/src/cpp/rtps/builtin/discovery/endpoint/EDP.cpp index e20f5d74afe..10d79eb1150 100644 --- a/src/cpp/rtps/builtin/discovery/endpoint/EDP.cpp +++ b/src/cpp/rtps/builtin/discovery/endpoint/EDP.cpp @@ -487,8 +487,8 @@ bool EDP::unpairWriterProxy( { if (r.matched_writer_remove(writer_guid, removed_by_lease)) { - const GUID_t& reader_guid = r.getGuid(); #if HAVE_SECURITY + const GUID_t& reader_guid = r.getGuid(); mp_RTPSParticipant->security_manager().remove_writer(reader_guid, participant_guid, writer_guid); #endif // if HAVE_SECURITY From a7cada7a21d0b2e231c0f64518fcec19dcddb5bd Mon Sep 17 00:00:00 2001 From: eduponz Date: Wed, 12 Jun 2024 07:40:27 +0200 Subject: [PATCH 2/2] Refs #21120: Fix build when no sec and no log infos Signed-off-by: eduponz --- src/cpp/rtps/builtin/discovery/endpoint/EDP.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cpp/rtps/builtin/discovery/endpoint/EDP.cpp b/src/cpp/rtps/builtin/discovery/endpoint/EDP.cpp index 10d79eb1150..c70932a95e2 100644 --- a/src/cpp/rtps/builtin/discovery/endpoint/EDP.cpp +++ b/src/cpp/rtps/builtin/discovery/endpoint/EDP.cpp @@ -854,6 +854,7 @@ bool EDP::pairingReader( #else if (R->matched_writer_add(*wdatait)) { + static_cast(reader_guid); // Void cast to force usage if we don't have LOG_INFOs EPROSIMA_LOG_INFO(RTPS_EDP_MATCH, "WP:" << wdatait->guid() << " match R:" << reader_guid << ". RLoc:" << wdatait->remote_locators());