From a379c5644a39e4816667aa0967c9ebda4fcd0144 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Tue, 30 Apr 2019 17:53:58 -0400 Subject: Clear alignment warnings on ARM 32-bit platforms (#828) --- blake2.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'blake2.cpp') diff --git a/blake2.cpp b/blake2.cpp index 622603c3..4623d23b 100644 --- a/blake2.cpp +++ b/blake2.cpp @@ -43,16 +43,17 @@ # undef CRYPTOPP_ALTIVEC_AVAILABLE #endif +// Can't use GetAlignmentOf() because of C++11 and constexpr +// Can use 'const unsigned int' because of MSVC #if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64) -const unsigned int ALIGN_SPEC32=16; -const unsigned int ALIGN_SPEC64=16; +# define ALIGN_SPEC32 16 +# define ALIGN_SPEC64 16 #elif (CRYPTOPP_CXX11_ALIGNOF) -const unsigned int ALIGN_SPEC32=alignof(CryptoPP::word32); -const unsigned int ALIGN_SPEC64=alignof(CryptoPP::word64); +# define ALIGN_SPEC32 alignof(CryptoPP::word32) +# define ALIGN_SPEC64 alignof(CryptoPP::word64) #else -// Can't use GetAlignmentOf() because of C++11 constexpr -const unsigned int ALIGN_SPEC32=4; -const unsigned int ALIGN_SPEC64=8; +# define ALIGN_SPEC32 4 +# define ALIGN_SPEC64 8 #endif NAMESPACE_BEGIN(CryptoPP) -- cgit v1.2.1