fix(MD*Engine) g++ array-bounds warning

This commit is contained in:
Alex Fabijanic 2023-10-16 12:12:10 +02:00
parent 22379ff9c1
commit 5fd6a45ea7
2 changed files with 4 additions and 0 deletions

View File

@ -134,8 +134,10 @@ const DigestEngine::Digest& MD4Engine::digest()
#if defined(POCO_COMPILER_GCC)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-overflow"
#pragma GCC diagnostic ignored "-Warray-bounds"
#endif
_digest.insert(_digest.begin(), digest, digest + sizeof(digest));
poco_assert_dbg (_digest.size() == sizeof(digest));
#if defined(POCO_COMPILER_GCC)
#pragma GCC diagnostic pop
#endif

View File

@ -134,8 +134,10 @@ const DigestEngine::Digest& MD5Engine::digest()
#if defined(POCO_COMPILER_GCC)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-overflow"
#pragma GCC diagnostic ignored "-Warray-bounds"
#endif
_digest.insert(_digest.begin(), digest, digest + sizeof(digest));
poco_assert_dbg (_digest.size() == sizeof(digest));
#if defined(POCO_COMPILER_GCC)
#pragma GCC diagnostic pop
#endif