From f5aa6f1f06b9c6b45a30f3dad5b183d6788535a0 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Fri, 11 Aug 2017 17:15:13 -0400 Subject: [PATCH] Cast enums to int for comparison --- default.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/default.cpp b/default.cpp index 8383499f..5db0f6fc 100644 --- a/default.cpp +++ b/default.cpp @@ -80,16 +80,16 @@ template DataEncryptor::DataEncryptor(const char *passphrase, BufferedTransformation *attachment) : ProxyFilter(NULLPTR, 0, 0, attachment), m_passphrase((const byte *)passphrase, strlen(passphrase)) { - CRYPTOPP_COMPILE_ASSERT(SALTLENGTH <= DIGESTSIZE); - CRYPTOPP_COMPILE_ASSERT(BLOCKSIZE <= DIGESTSIZE); + CRYPTOPP_COMPILE_ASSERT((int)SALTLENGTH <= DIGESTSIZE); + CRYPTOPP_COMPILE_ASSERT((int)BLOCKSIZE <= (int)DIGESTSIZE); } template DataEncryptor::DataEncryptor(const byte *passphrase, size_t passphraseLength, BufferedTransformation *attachment) : ProxyFilter(NULLPTR, 0, 0, attachment), m_passphrase(passphrase, passphraseLength) { - CRYPTOPP_COMPILE_ASSERT(SALTLENGTH <= DIGESTSIZE); - CRYPTOPP_COMPILE_ASSERT(BLOCKSIZE <= DIGESTSIZE); + CRYPTOPP_COMPILE_ASSERT((int)SALTLENGTH <= (int)DIGESTSIZE); + CRYPTOPP_COMPILE_ASSERT((int)BLOCKSIZE <= (int)DIGESTSIZE); } template @@ -140,8 +140,8 @@ DataDecryptor::DataDecryptor(const char *p, BufferedTransformation *a , m_passphrase((const byte *)p, strlen(p)) , m_throwException(throwException) { - CRYPTOPP_COMPILE_ASSERT(SALTLENGTH <= DIGESTSIZE); - CRYPTOPP_COMPILE_ASSERT(BLOCKSIZE <= DIGESTSIZE); + CRYPTOPP_COMPILE_ASSERT((int)SALTLENGTH <= (int)DIGESTSIZE); + CRYPTOPP_COMPILE_ASSERT((int)BLOCKSIZE <= (int)DIGESTSIZE); } template @@ -151,8 +151,8 @@ DataDecryptor::DataDecryptor(const byte *passphrase, size_t passphras , m_passphrase(passphrase, passphraseLength) , m_throwException(throwException) { - CRYPTOPP_COMPILE_ASSERT(SALTLENGTH <= DIGESTSIZE); - CRYPTOPP_COMPILE_ASSERT(BLOCKSIZE <= DIGESTSIZE); + CRYPTOPP_COMPILE_ASSERT((int)SALTLENGTH <= (int)DIGESTSIZE); + CRYPTOPP_COMPILE_ASSERT((int)BLOCKSIZE <= (int)DIGESTSIZE); } template