Skip to content

Commit

Permalink
Suppress false positive warning
Browse files Browse the repository at this point in the history
  • Loading branch information
sashashura committed Nov 16, 2023
1 parent bc2cea6 commit 27212a1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Packet++/src/IPv6Extensions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint8_t>(m_RecValueLen);
#if defined(__GNUC__) && __GNUC__ >= 10
#pragma GCC diagnostic pop
#endif
if (m_RecValueLen > 0)
memcpy(recordBuffer+2, m_RecValue, m_RecValueLen);
}
Expand Down

0 comments on commit 27212a1

Please sign in to comment.