Supress "-Wmaybe-unitiialized" warning under GCC; guard to ensure it does not produce unknown pragma warning under Clang

pull/35/head
Jeffrey Walton 2015-07-31 04:44:28 -04:00
parent 3caada0a9e
commit b84cd9013a
1 changed files with 14 additions and 0 deletions

View File

@ -449,6 +449,16 @@ VMAC_Base::VHASH_Update_SSE2(const word64 *data, size_t blocksRemainingInWord64,
}
#endif
// vmac.cpp:404:93: warning: al2 may be used uninitialized in this function
// ... vmac.cpp:479:26: note: al2 was declared here
// Valgrind cleared this finding.
#if GCC_DIAGNOSTIC_AWARE
# pragma GCC diagnostic push
# ifndef __clang__
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
# endif
#endif
#if !(defined(_MSC_VER) && _MSC_VER < 1300)
template <bool T_128BitTag>
#endif
@ -709,6 +719,10 @@ void VMAC_Base::VHASH_Update_Template(const word64 *data, size_t blocksRemaining
#endif
}
#if GCC_DIAGNOSTIC_AWARE
# pragma GCC diagnostic pop
#endif
inline void VMAC_Base::VHASH_Update(const word64 *data, size_t blocksRemainingInWord64)
{
#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE && CRYPTOPP_BOOL_X86