diff --git a/include/fastdds/rtps/common/InstanceHandle.h b/include/fastdds/rtps/common/InstanceHandle.h index 4adbe9f387a..22a689f48c0 100644 --- a/include/fastdds/rtps/common/InstanceHandle.h +++ b/include/fastdds/rtps/common/InstanceHandle.h @@ -298,7 +298,7 @@ inline std::ostream& operator <<( { output << (int)iHandle.value[i] << "."; } - output << (int)iHandle.value[15] << std::dec; + output << (int)iHandle.value[15u] << std::dec; return output; } @@ -331,9 +331,9 @@ inline std::istream& operator >>( input.setstate(std::ios_base::failbit); } - iHandle.value[0] = static_cast(hex); + iHandle.value[0u] = static_cast(hex); - for (int i = 1; i < 16; ++i) + for (uint8_t i = 1; i < 16; ++i) { input >> point >> hex; if ( point != '.' || hex > 255 )