summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-06-02 05:06:56 -0400
committerJeffrey Walton <noloader@gmail.com>2017-06-02 05:06:56 -0400
commitc3871aec948013c1a4d5613050c659520f59e2e4 (patch)
treee225eb08c119149fbd211a578c2383f8b5c761bf
parentdd42fa3ef63ee2ac8d335c3e261aa7c4d030d292 (diff)
downloadcryptopp-git-c3871aec948013c1a4d5613050c659520f59e2e4.tar.gz
Revert "Clear Visual Studio warnings (Issue 412)"
This reverts commit eb3b27a6a543. The change broke GCC 4.8 and unknown version of Clang on OS X. UB reported the OS X break, and JW found duplicated the break on a ARM CubieTruck with GCC 4.8.
-rw-r--r--algparam.h8
-rw-r--r--bench1.cpp8
-rw-r--r--bench2.cpp4
-rw-r--r--channels.cpp4
-rw-r--r--channels.h9
-rw-r--r--config.h4
-rw-r--r--cryptlib.h2
-rw-r--r--datatest.cpp4
-rw-r--r--dlltest.cpp4
-rw-r--r--ec2n.h9
-rw-r--r--eccrypto.h9
-rw-r--r--ecp.h9
-rw-r--r--filters.cpp2
-rw-r--r--filters.h2
-rw-r--r--gf2n.h9
-rw-r--r--gfpcrypt.h2
-rw-r--r--iterhash.h14
-rw-r--r--modarith.h9
-rw-r--r--modes.h12
-rw-r--r--modexppc.h9
-rw-r--r--regtest1.cpp4
-rw-r--r--regtest2.cpp4
-rw-r--r--regtest3.cpp4
-rw-r--r--secblock.h4
-rw-r--r--strciphr.h2
-rw-r--r--validat0.cpp4
-rw-r--r--validat1.cpp4
-rw-r--r--validat2.cpp4
-rw-r--r--validat3.cpp4
29 files changed, 12 insertions, 155 deletions
diff --git a/algparam.h b/algparam.h
index 95399615..aceaba4e 100644
--- a/algparam.h
+++ b/algparam.h
@@ -11,12 +11,10 @@
#include "config.h"
#include "cryptlib.h"
-#if CRYPTOPP_MSC_VERSION
+// TODO: fix 6011 when the API/ABI can change
+#if (CRYPTOPP_MSC_VERSION >= 1400)
# pragma warning(push)
-# pragma warning(disable: 4231 4275)
-# if (CRYPTOPP_MSC_VERSION >= 1400)
-# pragma warning(disable: 6011 6386 28193)
-# endif
+# pragma warning(disable: 6011 28193)
#endif
#include "smartptr.h"
diff --git a/bench1.cpp b/bench1.cpp
index 2d128648..94173005 100644
--- a/bench1.cpp
+++ b/bench1.cpp
@@ -16,14 +16,6 @@
#include "cpu.h"
#include "drbg.h"
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(disable: 4355)
-#endif
-
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(disable: 4505 4355)
-#endif
-
NAMESPACE_BEGIN(CryptoPP)
NAMESPACE_BEGIN(Test)
diff --git a/bench2.cpp b/bench2.cpp
index 3d07b2d0..e0853c4a 100644
--- a/bench2.cpp
+++ b/bench2.cpp
@@ -30,10 +30,6 @@
#include "oids.h"
#include "randpool.h"
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(disable: 4505 4355)
-#endif
-
NAMESPACE_BEGIN(CryptoPP)
NAMESPACE_BEGIN(Test)
diff --git a/channels.cpp b/channels.cpp
index ec7a98a0..62419fdd 100644
--- a/channels.cpp
+++ b/channels.cpp
@@ -8,10 +8,6 @@
#include "cryptlib.h"
#include "channels.h"
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(disable: 4355)
-#endif
-
NAMESPACE_BEGIN(CryptoPP)
#if 0
diff --git a/channels.h b/channels.h
index 9af4b461..deacca0d 100644
--- a/channels.h
+++ b/channels.h
@@ -12,11 +12,6 @@
#include "smartptr.h"
#include "stdcpp.h"
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(push)
-# pragma warning(disable: 4355)
-#endif
-
NAMESPACE_BEGIN(CryptoPP)
#if 0
@@ -136,8 +131,4 @@ private:
NAMESPACE_END
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(pop)
-#endif
-
#endif
diff --git a/config.h b/config.h
index 1dec8b4a..d21b0d4a 100644
--- a/config.h
+++ b/config.h
@@ -732,8 +732,6 @@ NAMESPACE_END
#define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS extern class CRYPTOPP_DLL
#elif defined(__BORLANDC__) || defined(__SUNPRO_CC)
#define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS template class CRYPTOPP_DLL
-#elif !defined(CRYPTOPP_IMPORTS) && !defined(CRYPTOPP_EXPORTS)
-#define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS template class CRYPTOPP_DLL
#else
#define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS extern template class CRYPTOPP_DLL
#endif
@@ -748,8 +746,6 @@ NAMESPACE_END
#define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS extern class
#elif defined(__BORLANDC__) || defined(__SUNPRO_CC)
#define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS template class
-#elif !defined(CRYPTOPP_IMPORTS) && !defined(CRYPTOPP_EXPORTS)
-#define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS template class
#else
#define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS extern template class
#endif
diff --git a/cryptlib.h b/cryptlib.h
index b855784d..f2c04267 100644
--- a/cryptlib.h
+++ b/cryptlib.h
@@ -99,7 +99,7 @@ and getting us started on the manual.
#if CRYPTOPP_MSC_VERSION
# pragma warning(push)
-# pragma warning(disable: 4127 4189 4505 4702)
+# pragma warning(disable: 4127 4189 4702)
#endif
NAMESPACE_BEGIN(CryptoPP)
diff --git a/datatest.cpp b/datatest.cpp
index 2f9bcb5f..805fcd03 100644
--- a/datatest.cpp
+++ b/datatest.cpp
@@ -25,8 +25,8 @@
# pragma strict_gs_check (on)
#endif
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(disable: 4505 4355)
+#if defined(__COVERITY__)
+extern "C" void __coverity_tainted_data_sanitize__(void *);
#endif
NAMESPACE_BEGIN(CryptoPP)
diff --git a/dlltest.cpp b/dlltest.cpp
index 102fd7d0..27def6f0 100644
--- a/dlltest.cpp
+++ b/dlltest.cpp
@@ -6,10 +6,6 @@
#include "cryptlib.h"
#include "filters.h"
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(disable: 4505 4355)
-#endif
-
USING_NAMESPACE(CryptoPP)
USING_NAMESPACE(std)
diff --git a/ec2n.h b/ec2n.h
index cc4c0462..1d4c9824 100644
--- a/ec2n.h
+++ b/ec2n.h
@@ -17,11 +17,6 @@
#include "smartptr.h"
#include "pubkey.h"
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(push)
-# pragma warning(disable: 4231 4275)
-#endif
-
NAMESPACE_BEGIN(CryptoPP)
//! \class EC2N
@@ -128,8 +123,4 @@ private:
NAMESPACE_END
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(pop)
-#endif
-
#endif
diff --git a/eccrypto.h b/eccrypto.h
index a4bf3e75..2a1836c2 100644
--- a/eccrypto.h
+++ b/eccrypto.h
@@ -22,11 +22,6 @@
#include "ecp.h"
#include "ec2n.h"
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(push)
-# pragma warning(disable: 4231 4275)
-#endif
-
NAMESPACE_BEGIN(CryptoPP)
//! \brief Elliptic Curve Parameters
@@ -670,8 +665,4 @@ CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKey_WithSignaturePairwiseConsistencyTest<D
NAMESPACE_END
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(pop)
-#endif
-
#endif
diff --git a/ecp.h b/ecp.h
index 082eb636..4b5604a0 100644
--- a/ecp.h
+++ b/ecp.h
@@ -15,11 +15,6 @@
#include "smartptr.h"
#include "pubkey.h"
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(push)
-# pragma warning(disable: 4231 4275)
-#endif
-
NAMESPACE_BEGIN(CryptoPP)
//! \class ECP
@@ -145,8 +140,4 @@ private:
NAMESPACE_END
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(pop)
-#endif
-
#endif
diff --git a/filters.cpp b/filters.cpp
index 7b0017a6..5984e9f0 100644
--- a/filters.cpp
+++ b/filters.cpp
@@ -4,7 +4,7 @@
#include "config.h"
#if CRYPTOPP_MSC_VERSION
-# pragma warning(disable: 4100 4189 4355)
+# pragma warning(disable: 4100 4189)
#endif
#if CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE
diff --git a/filters.h b/filters.h
index f12be70d..faa7b7dd 100644
--- a/filters.h
+++ b/filters.h
@@ -10,7 +10,7 @@
#if CRYPTOPP_MSC_VERSION
# pragma warning(push)
-# pragma warning(disable: 4127 4189 4231 4275 4514)
+# pragma warning(disable: 4127 4189 4514)
#endif
#include "cryptlib.h"
diff --git a/gf2n.h b/gf2n.h
index 032876a1..6dc18310 100644
--- a/gf2n.h
+++ b/gf2n.h
@@ -14,11 +14,6 @@
#include <iosfwd>
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(push)
-# pragma warning(disable: 4231 4275)
-#endif
-
NAMESPACE_BEGIN(CryptoPP)
//! \brief Polynomial with Coefficients in GF(2)
@@ -380,8 +375,4 @@ template<> inline void swap(CryptoPP::PolynomialMod2 &a, CryptoPP::PolynomialMod
NAMESPACE_END
#endif
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(pop)
-#endif
-
#endif
diff --git a/gfpcrypt.h b/gfpcrypt.h
index 5addf8ed..974886fa 100644
--- a/gfpcrypt.h
+++ b/gfpcrypt.h
@@ -12,7 +12,7 @@
#if CRYPTOPP_MSC_VERSION
# pragma warning(push)
-# pragma warning(disable: 4189 4231 4275)
+# pragma warning(disable: 4189)
#endif
#include "cryptlib.h"
diff --git a/iterhash.h b/iterhash.h
index 1b3e7cb5..bdfa05ab 100644
--- a/iterhash.h
+++ b/iterhash.h
@@ -1,5 +1,3 @@
-// strciphr.h - originally written and placed in the public domain by Wei Dai
-
#ifndef CRYPTOPP_ITERHASH_H
#define CRYPTOPP_ITERHASH_H
@@ -8,14 +6,6 @@
#include "misc.h"
#include "simple.h"
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(push)
-# pragma warning(disable: 4231 4275)
-# if (CRYPTOPP_MSC_VERSION >= 1400)
-# pragma warning(disable: 6011 6386 28193)
-# endif
-#endif
-
NAMESPACE_BEGIN(CryptoPP)
//! \class HashInputTooLong
@@ -189,8 +179,4 @@ protected:
NAMESPACE_END
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(pop)
-#endif
-
#endif
diff --git a/modarith.h b/modarith.h
index 1a78f535..5fff4275 100644
--- a/modarith.h
+++ b/modarith.h
@@ -14,11 +14,6 @@
#include "secblock.h"
#include "misc.h"
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(push)
-# pragma warning(disable: 4231 4275)
-#endif
-
NAMESPACE_BEGIN(CryptoPP)
CRYPTOPP_DLL_TEMPLATE_CLASS AbstractGroup<Integer>;
@@ -318,8 +313,4 @@ private:
NAMESPACE_END
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(pop)
-#endif
-
#endif
diff --git a/modes.h b/modes.h
index 05be7b52..0955c3bd 100644
--- a/modes.h
+++ b/modes.h
@@ -20,14 +20,6 @@
# pragma GCC diagnostic ignored "-Wsign-conversion"
#endif
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(push)
-# pragma warning(disable: 4231 4275)
-# if (CRYPTOPP_MSC_VERSION >= 1400)
-# pragma warning(disable: 6011 6386 28193)
-# endif
-#endif
-
NAMESPACE_BEGIN(CryptoPP)
//! \class CipherModeDocumentation
@@ -483,10 +475,6 @@ struct CBC_CTS_Mode_ExternalCipher : public CipherModeDocumentation
NAMESPACE_END
// Issue 340
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(pop)
-#endif
-
#if CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE
# pragma GCC diagnostic pop
#endif
diff --git a/modexppc.h b/modexppc.h
index 5e8dd676..c2978871 100644
--- a/modexppc.h
+++ b/modexppc.h
@@ -9,11 +9,6 @@
#include "smartptr.h"
#include "pubkey.h"
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(push)
-# pragma warning(disable: 4231 4275)
-#endif
-
NAMESPACE_BEGIN(CryptoPP)
CRYPTOPP_DLL_TEMPLATE_CLASS DL_FixedBasePrecomputationImpl<Integer>;
@@ -41,8 +36,4 @@ private:
NAMESPACE_END
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(pop)
-#endif
-
#endif
diff --git a/regtest1.cpp b/regtest1.cpp
index 86780e69..c4eb7380 100644
--- a/regtest1.cpp
+++ b/regtest1.cpp
@@ -34,10 +34,6 @@
# pragma strict_gs_check (on)
#endif
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(disable: 4505 4355)
-#endif
-
USING_NAMESPACE(CryptoPP)
// Unkeyed ciphers
diff --git a/regtest2.cpp b/regtest2.cpp
index 8779c113..d7a1d58c 100644
--- a/regtest2.cpp
+++ b/regtest2.cpp
@@ -61,10 +61,6 @@
# pragma strict_gs_check (on)
#endif
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(disable: 4505 4355)
-#endif
-
USING_NAMESPACE(CryptoPP)
// Shared key ciphers
diff --git a/regtest3.cpp b/regtest3.cpp
index 7949c846..292bd544 100644
--- a/regtest3.cpp
+++ b/regtest3.cpp
@@ -26,10 +26,6 @@
# pragma strict_gs_check (on)
#endif
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(disable: 4505 4355)
-#endif
-
USING_NAMESPACE(CryptoPP)
void RegisterFactories3()
diff --git a/secblock.h b/secblock.h
index 8f5aa71a..73706897 100644
--- a/secblock.h
+++ b/secblock.h
@@ -12,9 +12,9 @@
#if CRYPTOPP_MSC_VERSION
# pragma warning(push)
-# pragma warning(disable: 4231 4275 4700)
+# pragma warning(disable: 4700)
# if (CRYPTOPP_MSC_VERSION >= 1400)
-# pragma warning(disable: 6011 6386 28193)
+# pragma warning(disable: 6386)
# endif
#endif
diff --git a/strciphr.h b/strciphr.h
index ff7cca67..83be614c 100644
--- a/strciphr.h
+++ b/strciphr.h
@@ -32,7 +32,7 @@
#if CRYPTOPP_MSC_VERSION
# pragma warning(push)
-# pragma warning(disable: 4127 4189 4231 4275)
+# pragma warning(disable: 4127 4189)
#endif
#include "cryptlib.h"
diff --git a/validat0.cpp b/validat0.cpp
index 4b482c03..a0aa9e61 100644
--- a/validat0.cpp
+++ b/validat0.cpp
@@ -31,10 +31,6 @@
# pragma strict_gs_check (on)
#endif
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(disable: 4505 4355)
-#endif
-
NAMESPACE_BEGIN(CryptoPP)
NAMESPACE_BEGIN(Test)
diff --git a/validat1.cpp b/validat1.cpp
index c10efdf4..50d6911d 100644
--- a/validat1.cpp
+++ b/validat1.cpp
@@ -64,10 +64,6 @@
# pragma strict_gs_check (on)
#endif
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(disable: 4505 4355)
-#endif
-
NAMESPACE_BEGIN(CryptoPP)
NAMESPACE_BEGIN(Test)
diff --git a/validat2.cpp b/validat2.cpp
index 3d984e92..cc505edd 100644
--- a/validat2.cpp
+++ b/validat2.cpp
@@ -51,10 +51,6 @@
# pragma strict_gs_check (on)
#endif
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(disable: 4505 4355)
-#endif
-
NAMESPACE_BEGIN(CryptoPP)
NAMESPACE_BEGIN(Test)
diff --git a/validat3.cpp b/validat3.cpp
index 81257ec8..829840b0 100644
--- a/validat3.cpp
+++ b/validat3.cpp
@@ -44,10 +44,6 @@
# pragma strict_gs_check (on)
#endif
-#if CRYPTOPP_MSC_VERSION
-# pragma warning(disable: 4505 4355)
-#endif
-
NAMESPACE_BEGIN(CryptoPP)
NAMESPACE_BEGIN(Test)