diff --git a/include/fastdds/rtps/network/NetworkBuffer.hpp b/include/fastdds/rtps/network/NetworkBuffer.hpp index f9f49db3e65..6048ec75aab 100644 --- a/include/fastdds/rtps/network/NetworkBuffer.hpp +++ b/include/fastdds/rtps/network/NetworkBuffer.hpp @@ -19,8 +19,7 @@ #ifndef _FASTDDS_RTPS_NETWORK_NETWORKBUFFER_HPP #define _FASTDDS_RTPS_NETWORK_NETWORKBUFFER_HPP -#include // uint32_t -#include // size_t +#include #include namespace eprosima { @@ -36,11 +35,11 @@ struct NetworkBuffer final //! Pointer to the buffer where the data is stored. const void* buffer; //! Number of bytes to use starting at @c buffer. - size_t size; + uint32_t size; NetworkBuffer( const void* ptr, - size_t s) + uint32_t s) : buffer(ptr) , size(s) { @@ -54,7 +53,7 @@ struct NetworkBuffer final NetworkBuffer( const fastrtps::rtps::octet* ptr, - size_t s) + uint32_t s) : buffer(ptr) , size(s) { diff --git a/src/cpp/rtps/transport/TCPChannelResource.h b/src/cpp/rtps/transport/TCPChannelResource.h index 673fd4956e3..8473472fcea 100644 --- a/src/cpp/rtps/transport/TCPChannelResource.h +++ b/src/cpp/rtps/transport/TCPChannelResource.h @@ -152,7 +152,7 @@ class TCPChannelResource : public ChannelResource const fastrtps::rtps::octet* header, size_t header_size, const fastrtps::rtps::octet* data, - size_t data_size, + uint32_t data_size, asio::error_code& ec) { NetworkBuffer buffers(data, data_size); diff --git a/src/cpp/rtps/transport/test_UDPv4Transport.cpp b/src/cpp/rtps/transport/test_UDPv4Transport.cpp index 6f365e85f58..d4def3cc75e 100644 --- a/src/cpp/rtps/transport/test_UDPv4Transport.cpp +++ b/src/cpp/rtps/transport/test_UDPv4Transport.cpp @@ -494,6 +494,7 @@ bool test_UDPv4Transport::log_drop( const std::list& buffers, uint32_t size) { + static_cast(size); if (test_UDPv4Transport_DropLog.size() < test_UDPv4Transport_DropLogLength) { vector message; diff --git a/test/mock/rtps/StatefulReader/fastdds/rtps/reader/StatefulReader.h b/test/mock/rtps/StatefulReader/fastdds/rtps/reader/StatefulReader.h index c092cb87360..5a710433da3 100644 --- a/test/mock/rtps/StatefulReader/fastdds/rtps/reader/StatefulReader.h +++ b/test/mock/rtps/StatefulReader/fastdds/rtps/reader/StatefulReader.h @@ -15,10 +15,13 @@ #ifndef _FASTDDS_RTPS_READER_STATEFULREADER_H_ #define _FASTDDS_RTPS_READER_STATEFULREADER_H_ +#include + #include #include #include #include +#include namespace eprosima { namespace fastrtps {