summaryrefslogtreecommitdiff
path: root/cryptlib.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2023-01-16 21:53:31 -0500
committerGitHub <noreply@github.com>2023-01-16 21:53:31 -0500
commit524e99f2190197151aa3f7406bc6f39b85e5d12c (patch)
treeeb9836fd14215ef739ffdeb1c70c51ca704c42e2 /cryptlib.h
parentf0202c369ede549aa2d60e483b93c01c62ad400d (diff)
downloadcryptopp-git-524e99f2190197151aa3f7406bc6f39b85e5d12c.tar.gz
Fix unused variable declared as const under VS2022, v17.4 (GH #1185) (PR #1186)
Fix unused variable declared as const under VS2022, v17.4
Diffstat (limited to 'cryptlib.h')
-rw-r--r--cryptlib.h7
1 files changed, 6 insertions, 1 deletions
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