diff options
author | Jeffrey Walton <noloader@gmail.com> | 2023-01-16 21:53:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-16 21:53:31 -0500 |
commit | 524e99f2190197151aa3f7406bc6f39b85e5d12c (patch) | |
tree | eb9836fd14215ef739ffdeb1c70c51ca704c42e2 /cryptlib.h | |
parent | f0202c369ede549aa2d60e483b93c01c62ad400d (diff) | |
download | cryptopp-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.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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
|