From 36f1c16d9b70ac2303a454720de058fb9e6ac6af Mon Sep 17 00:00:00 2001 From: Miguel Company Date: Tue, 18 May 2021 09:03:23 +0200 Subject: [PATCH] Refs 11562. Avoid unused var warning. Signed-off-by: Miguel Company --- src/cpp/statistics/rtps/messages/RTPSStatisticsMessages.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cpp/statistics/rtps/messages/RTPSStatisticsMessages.hpp b/src/cpp/statistics/rtps/messages/RTPSStatisticsMessages.hpp index 2987a6f167e..b0f12371915 100644 --- a/src/cpp/statistics/rtps/messages/RTPSStatisticsMessages.hpp +++ b/src/cpp/statistics/rtps/messages/RTPSStatisticsMessages.hpp @@ -142,6 +142,9 @@ inline uint32_t get_statistics_message_pos( const eprosima::fastrtps::rtps::octet* send_buffer, uint32_t send_buffer_size) { + // Only used on an assert + static_cast(send_buffer); + // Message should contain RTPS header and statistic submessage assert(statistics_submessage_length + RTPSMESSAGE_HEADER_SIZE <= send_buffer_size);