diff --git a/Packet++/src/IPv6Extensions.cpp b/Packet++/src/IPv6Extensions.cpp index 2ce69ab704..ae2d4384ad 100644 --- a/Packet++/src/IPv6Extensions.cpp +++ b/Packet++/src/IPv6Extensions.cpp @@ -110,7 +110,14 @@ IPv6TLVOptionHeader::IPv6Option IPv6TLVOptionHeader::IPv6TLVOptionBuilder::build if (m_RecType != IPv6TLVOptionHeader::IPv6Option::Pad0OptionType) { recordBuffer[0] = recType; +#if defined(__GNUC__) && __GNUC__ >= 10 + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstringop-overflow" +#endif recordBuffer[1] = static_cast(m_RecValueLen); +#if defined(__GNUC__) && __GNUC__ >= 10 + #pragma GCC diagnostic pop +#endif if (m_RecValueLen > 0) memcpy(recordBuffer+2, m_RecValue, m_RecValueLen); }