Skip to content

Commit

Permalink
Revert "Clear Visual Studio warnings (Issue 412)"
Browse files Browse the repository at this point in the history
This reverts commit eb3b27a. 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.
  • Loading branch information
noloader committed Jun 2, 2017
1 parent dd42fa3 commit c3871ae
Show file tree
Hide file tree
Showing 29 changed files with 12 additions and 155 deletions.
8 changes: 3 additions & 5 deletions algparam.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 0 additions & 8 deletions bench1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 0 additions & 4 deletions bench2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 0 additions & 4 deletions channels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
#include "cryptlib.h"
#include "channels.h"

#if CRYPTOPP_MSC_VERSION
# pragma warning(disable: 4355)
#endif

NAMESPACE_BEGIN(CryptoPP)

#if 0
Expand Down
9 changes: 0 additions & 9 deletions channels.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -136,8 +131,4 @@ class CRYPTOPP_DLL ChannelSwitch : public Multichannel<Sink>, public ChannelSwit

NAMESPACE_END

#if CRYPTOPP_MSC_VERSION
# pragma warning(pop)
#endif

#endif
4 changes: 0 additions & 4 deletions config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cryptlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions datatest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 0 additions & 4 deletions dlltest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
9 changes: 0 additions & 9 deletions ec2n.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -128,8 +123,4 @@ template<> class EcPrecomputation<EC2N> : public DL_GroupPrecomputation<EC2N::Po

NAMESPACE_END

#if CRYPTOPP_MSC_VERSION
# pragma warning(pop)
#endif

#endif
9 changes: 0 additions & 9 deletions eccrypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -670,8 +665,4 @@ CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKey_WithSignaturePairwiseConsistencyTest<D

NAMESPACE_END

#if CRYPTOPP_MSC_VERSION
# pragma warning(pop)
#endif

#endif
9 changes: 0 additions & 9 deletions ecp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -145,8 +140,4 @@ template<> class EcPrecomputation<ECP> : public DL_GroupPrecomputation<ECP::Poin

NAMESPACE_END

#if CRYPTOPP_MSC_VERSION
# pragma warning(pop)
#endif

#endif
2 changes: 1 addition & 1 deletion filters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion filters.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 0 additions & 9 deletions gf2n.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion gfpcrypt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
14 changes: 0 additions & 14 deletions iterhash.h
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand Down Expand Up @@ -189,8 +179,4 @@ class CRYPTOPP_NO_VTABLE IteratedHashWithStaticTransform

NAMESPACE_END

#if CRYPTOPP_MSC_VERSION
# pragma warning(pop)
#endif

#endif
9 changes: 0 additions & 9 deletions modarith.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand Down Expand Up @@ -318,8 +313,4 @@ class CRYPTOPP_DLL MontgomeryRepresentation : public ModularArithmetic

NAMESPACE_END

#if CRYPTOPP_MSC_VERSION
# pragma warning(pop)
#endif

#endif
12 changes: 0 additions & 12 deletions modes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
9 changes: 0 additions & 9 deletions modexppc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand Down Expand Up @@ -41,8 +36,4 @@ class ModExpPrecomputation : public DL_GroupPrecomputation<Integer>

NAMESPACE_END

#if CRYPTOPP_MSC_VERSION
# pragma warning(pop)
#endif

#endif
4 changes: 0 additions & 4 deletions regtest1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions regtest2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions regtest3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions secblock.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion strciphr.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 0 additions & 4 deletions validat0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Loading

0 comments on commit c3871ae

Please sign in to comment.