From b84cd9013af00a3c909d83e6b98a7f03ea95e6c2 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Fri, 31 Jul 2015 04:44:28 -0400 Subject: Supress "-Wmaybe-unitiialized" warning under GCC; guard to ensure it does not produce unknown pragma warning under Clang --- vmac.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'vmac.cpp') diff --git a/vmac.cpp b/vmac.cpp index 02603829..b15651fc 100644 --- a/vmac.cpp +++ b/vmac.cpp @@ -448,6 +448,16 @@ VMAC_Base::VHASH_Update_SSE2(const word64 *data, size_t blocksRemainingInWord64, (rh) += (ih) + ((rl) < (_il)); \ } #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 @@ -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 -- cgit v1.2.1