From f92ee15ff20a92be42c89e28a0b390eb6b9ec599 Mon Sep 17 00:00:00 2001 From: elianalf <62831776+elianalf@users.noreply.github.com> Date: Fri, 14 Jun 2024 08:21:28 +0200 Subject: [PATCH] Fix compilation warning Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com> --- src/cpp/rtps/messages/RTPSMessageGroup.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpp/rtps/messages/RTPSMessageGroup.cpp b/src/cpp/rtps/messages/RTPSMessageGroup.cpp index e238f65b76a..4b81a6d5e5f 100644 --- a/src/cpp/rtps/messages/RTPSMessageGroup.cpp +++ b/src/cpp/rtps/messages/RTPSMessageGroup.cpp @@ -356,13 +356,13 @@ void RTPSMessageGroup::send() { if (endpoint_ && sender_) { - CDRMessage_t* msgToSend = header_msg_; if (header_msg_->length > RTPSMESSAGE_HEADER_SIZE) { std::lock_guard lock(*sender_); #if HAVE_SECURITY + CDRMessage_t* msgToSend = header_msg_; // TODO(Ricardo) Control message size if it will be encrypted. if (participant_->security_attributes().is_rtps_protected && endpoint_->supports_rtps_protection()) {