From 524e99f2190197151aa3f7406bc6f39b85e5d12c Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Mon, 16 Jan 2023 21:53:31 -0500 Subject: Fix unused variable declared as const under VS2022, v17.4 (GH #1185) (PR #1186) Fix unused variable declared as const under VS2022, v17.4 --- cryptlib.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cryptlib.h') diff --git a/cryptlib.h b/cryptlib.h index 5d8792d6..a528b780 100644 --- a/cryptlib.h +++ b/cryptlib.h @@ -106,9 +106,14 @@ and getting us started on the manual. #include "stdcpp.h" #include "trap.h" +// C5264 new for VS2022/v17.4, MSC v14.34 +// https://github.com/weidai11/cryptopp/issues/1185 #if CRYPTOPP_MSC_VERSION # pragma warning(push) # pragma warning(disable: 4127 4189 4505 4702) +# if (CRYPTOPP_MSC_VERSION >= 1434) +# pragma warning(disable: 5264) +# endif #endif NAMESPACE_BEGIN(CryptoPP) @@ -127,7 +132,7 @@ enum CipherDir { DECRYPTION}; /// \brief Represents infinite time -const unsigned long INFINITE_TIME = ULONG_MAX; +CRYPTOPP_CONST_OR_CONSTEXPR unsigned long INFINITE_TIME = ULONG_MAX; // VC60 workaround: using enums as template parameters causes problems /// \brief Converts an enumeration to a type suitable for use as a template parameter -- cgit v1.2.1