Clear Visual Studio warnings (Issue 412)

This commit is contained in:
Jeffrey Walton 2017-05-30 16:37:41 -04:00
parent 23448050c0
commit eb3b27a6a5
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
29 changed files with 156 additions and 13 deletions

View File

@ -11,10 +11,12 @@
#include "config.h"
#include "cryptlib.h"
// TODO: fix 6011 when the API/ABI can change
#if (CRYPTOPP_MSC_VERSION >= 1400)
#if CRYPTOPP_MSC_VERSION
# pragma warning(push)
# pragma warning(disable: 6011 28193)
# pragma warning(disable: 4231 4275)
# if (CRYPTOPP_MSC_VERSION >= 1400)
# pragma warning(disable: 6011 6386 28193)
# endif
#endif
#include "smartptr.h"
@ -301,7 +303,7 @@ AssignFromHelperClass<T, T> AssignFromHelper(T *pObject, const NameValuePairs &s
#ifndef CRYPTOPP_NO_ASSIGN_TO_INTEGER
// Allow the linker to discard Integer code if not needed.
// Also see http://github.com/weidai11/cryptopp/issues/389.
CRYPTOPP_DLL bool AssignIntToInteger(const std::type_info &valueType, void *pInteger, const void *pInt);
bool AssignIntToInteger(const std::type_info &valueType, void *pInteger, const void *pInt);
#endif
CRYPTOPP_DLL const std::type_info & CRYPTOPP_API IntegerTypeId();

View File

@ -16,6 +16,14 @@
#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)

View File

@ -30,6 +30,10 @@
#include "oids.h"
#include "randpool.h"
#if CRYPTOPP_MSC_VERSION
# pragma warning(disable: 4505 4355)
#endif
NAMESPACE_BEGIN(CryptoPP)
NAMESPACE_BEGIN(Test)

View File

@ -8,6 +8,10 @@
#include "cryptlib.h"
#include "channels.h"
#if CRYPTOPP_MSC_VERSION
# pragma warning(disable: 4355)
#endif
NAMESPACE_BEGIN(CryptoPP)
#if 0

View File

@ -12,6 +12,11 @@
#include "smartptr.h"
#include "stdcpp.h"
#if CRYPTOPP_MSC_VERSION
# pragma warning(push)
# pragma warning(disable: 4355)
#endif
NAMESPACE_BEGIN(CryptoPP)
#if 0
@ -131,4 +136,8 @@ private:
NAMESPACE_END
#if CRYPTOPP_MSC_VERSION
# pragma warning(pop)
#endif
#endif

View File

@ -732,6 +732,8 @@ 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
@ -746,6 +748,8 @@ 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

View File

@ -99,7 +99,7 @@ and getting us started on the manual.
#if CRYPTOPP_MSC_VERSION
# pragma warning(push)
# pragma warning(disable: 4127 4189 4702)
# pragma warning(disable: 4127 4189 4505 4702)
#endif
NAMESPACE_BEGIN(CryptoPP)

View File

@ -25,8 +25,8 @@
# pragma strict_gs_check (on)
#endif
#if defined(__COVERITY__)
extern "C" void __coverity_tainted_data_sanitize__(void *);
#if CRYPTOPP_MSC_VERSION
# pragma warning(disable: 4505 4355)
#endif
NAMESPACE_BEGIN(CryptoPP)

View File

@ -6,6 +6,10 @@
#include "cryptlib.h"
#include "filters.h"
#if CRYPTOPP_MSC_VERSION
# pragma warning(disable: 4505 4355)
#endif
USING_NAMESPACE(CryptoPP)
USING_NAMESPACE(std)

9
ec2n.h
View File

@ -17,6 +17,11 @@
#include "smartptr.h"
#include "pubkey.h"
#if CRYPTOPP_MSC_VERSION
# pragma warning(push)
# pragma warning(disable: 4231 4275)
#endif
NAMESPACE_BEGIN(CryptoPP)
//! \class EC2N
@ -123,4 +128,8 @@ private:
NAMESPACE_END
#if CRYPTOPP_MSC_VERSION
# pragma warning(pop)
#endif
#endif

View File

@ -22,6 +22,11 @@
#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
@ -665,4 +670,8 @@ CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKey_WithSignaturePairwiseConsistencyTest<D
NAMESPACE_END
#if CRYPTOPP_MSC_VERSION
# pragma warning(pop)
#endif
#endif

9
ecp.h
View File

@ -15,6 +15,11 @@
#include "smartptr.h"
#include "pubkey.h"
#if CRYPTOPP_MSC_VERSION
# pragma warning(push)
# pragma warning(disable: 4231 4275)
#endif
NAMESPACE_BEGIN(CryptoPP)
//! \class ECP
@ -140,4 +145,8 @@ private:
NAMESPACE_END
#if CRYPTOPP_MSC_VERSION
# pragma warning(pop)
#endif
#endif

View File

@ -4,7 +4,7 @@
#include "config.h"
#if CRYPTOPP_MSC_VERSION
# pragma warning(disable: 4100 4189)
# pragma warning(disable: 4100 4189 4355)
#endif
#if CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE

View File

@ -10,7 +10,7 @@
#if CRYPTOPP_MSC_VERSION
# pragma warning(push)
# pragma warning(disable: 4127 4189 4514)
# pragma warning(disable: 4127 4189 4231 4275 4514)
#endif
#include "cryptlib.h"

9
gf2n.h
View File

@ -14,6 +14,11 @@
#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)
@ -375,4 +380,8 @@ template<> inline void swap(CryptoPP::PolynomialMod2 &a, CryptoPP::PolynomialMod
NAMESPACE_END
#endif
#if CRYPTOPP_MSC_VERSION
# pragma warning(pop)
#endif
#endif

View File

@ -12,7 +12,7 @@
#if CRYPTOPP_MSC_VERSION
# pragma warning(push)
# pragma warning(disable: 4189)
# pragma warning(disable: 4189 4231 4275)
#endif
#include "cryptlib.h"

View File

@ -1,3 +1,5 @@
// strciphr.h - originally written and placed in the public domain by Wei Dai
#ifndef CRYPTOPP_ITERHASH_H
#define CRYPTOPP_ITERHASH_H
@ -6,6 +8,14 @@
#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
@ -179,4 +189,8 @@ protected:
NAMESPACE_END
#if CRYPTOPP_MSC_VERSION
# pragma warning(pop)
#endif
#endif

View File

@ -14,6 +14,11 @@
#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>;
@ -313,4 +318,8 @@ private:
NAMESPACE_END
#if CRYPTOPP_MSC_VERSION
# pragma warning(pop)
#endif
#endif

12
modes.h
View File

@ -20,6 +20,14 @@
# 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
@ -475,6 +483,10 @@ 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

View File

@ -9,6 +9,11 @@
#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>;
@ -36,4 +41,8 @@ private:
NAMESPACE_END
#if CRYPTOPP_MSC_VERSION
# pragma warning(pop)
#endif
#endif

View File

@ -34,6 +34,10 @@
# pragma strict_gs_check (on)
#endif
#if CRYPTOPP_MSC_VERSION
# pragma warning(disable: 4505 4355)
#endif
USING_NAMESPACE(CryptoPP)
// Unkeyed ciphers

View File

@ -61,6 +61,10 @@
# pragma strict_gs_check (on)
#endif
#if CRYPTOPP_MSC_VERSION
# pragma warning(disable: 4505 4355)
#endif
USING_NAMESPACE(CryptoPP)
// Shared key ciphers

View File

@ -26,6 +26,10 @@
# pragma strict_gs_check (on)
#endif
#if CRYPTOPP_MSC_VERSION
# pragma warning(disable: 4505 4355)
#endif
USING_NAMESPACE(CryptoPP)
void RegisterFactories3()

View File

@ -12,9 +12,9 @@
#if CRYPTOPP_MSC_VERSION
# pragma warning(push)
# pragma warning(disable: 4700)
# pragma warning(disable: 4231 4275 4700)
# if (CRYPTOPP_MSC_VERSION >= 1400)
# pragma warning(disable: 6386)
# pragma warning(disable: 6011 6386 28193)
# endif
#endif

View File

@ -32,7 +32,7 @@
#if CRYPTOPP_MSC_VERSION
# pragma warning(push)
# pragma warning(disable: 4127 4189)
# pragma warning(disable: 4127 4189 4231 4275)
#endif
#include "cryptlib.h"

View File

@ -31,6 +31,10 @@
# pragma strict_gs_check (on)
#endif
#if CRYPTOPP_MSC_VERSION
# pragma warning(disable: 4505 4355)
#endif
NAMESPACE_BEGIN(CryptoPP)
NAMESPACE_BEGIN(Test)

View File

@ -64,6 +64,10 @@
# pragma strict_gs_check (on)
#endif
#if CRYPTOPP_MSC_VERSION
# pragma warning(disable: 4505 4355)
#endif
NAMESPACE_BEGIN(CryptoPP)
NAMESPACE_BEGIN(Test)

View File

@ -51,6 +51,10 @@
# pragma strict_gs_check (on)
#endif
#if CRYPTOPP_MSC_VERSION
# pragma warning(disable: 4505 4355)
#endif
NAMESPACE_BEGIN(CryptoPP)
NAMESPACE_BEGIN(Test)

View File

@ -44,6 +44,10 @@
# pragma strict_gs_check (on)
#endif
#if CRYPTOPP_MSC_VERSION
# pragma warning(disable: 4505 4355)
#endif
NAMESPACE_BEGIN(CryptoPP)
NAMESPACE_BEGIN(Test)