Skip to content

Commit 83dfa07

Browse files
committed
Refs #21129: Move variable declaration to remove warnings
Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com>
1 parent 7cafd40 commit 83dfa07

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/cpp/rtps/messages/RTPSMessageGroup.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,13 +356,12 @@ void RTPSMessageGroup::send()
356356
{
357357
if (endpoint_ && sender_)
358358
{
359-
CDRMessage_t* msgToSend = header_msg_;
360-
361359
if (header_msg_->length > RTPSMESSAGE_HEADER_SIZE)
362360
{
363361
std::lock_guard<RTPSMessageSenderInterface> lock(*sender_);
364362

365363
#if HAVE_SECURITY
364+
CDRMessage_t* msgToSend = header_msg_;
366365
// TODO(Ricardo) Control message size if it will be encrypted.
367366
if (participant_->security_attributes().is_rtps_protected && endpoint_->supports_rtps_protection())
368367
{

0 commit comments

Comments
 (0)