diff options
-rw-r--r-- | algebra.h | 4 | ||||
-rw-r--r-- | asn.cpp | 8 | ||||
-rw-r--r-- | factory.h | 12 | ||||
-rw-r--r-- | fips140.cpp | 7 | ||||
-rw-r--r-- | gf256.h | 4 | ||||
-rw-r--r-- | gf2_32.h | 5 | ||||
-rw-r--r-- | xtr.cpp | 1 |
7 files changed, 31 insertions, 10 deletions
@@ -49,7 +49,7 @@ public: AbstractRing() {m_mg.m_pRing = this;} AbstractRing(const AbstractRing &source) : AbstractGroup<T>(source) {m_mg.m_pRing = this;} - AbstractRing& operator=(const AbstractRing &source) {CRYTPOPP_UNUSED(source);return *this;} + AbstractRing& operator=(const AbstractRing &source) {CRYPTOPP_UNUSED(source);return *this;} virtual bool IsUnit(const Element &a) const =0; virtual const Element& MultiplicativeIdentity() const =0; @@ -209,7 +209,7 @@ public: {Element::Divide(r, q, a, d);} bool operator==(const EuclideanDomainOf<T> &rhs) const - {return true;} + {CRYPTOPP_UNUSED(rhs);return true;} private: mutable Element result; @@ -405,12 +405,12 @@ void BERGeneralDecoder::Init(byte asnTag) BERGeneralDecoder::~BERGeneralDecoder() { - try // avoid throwing in constructor + try // avoid throwing in desstructor { if (!m_finished) MessageEnd(); } - catch (...) + catch (const Exception&) { } } @@ -496,12 +496,12 @@ DERGeneralEncoder::DERGeneralEncoder(DERGeneralEncoder &outQueue, byte asnTag) DERGeneralEncoder::~DERGeneralEncoder() { - try // avoid throwing in constructor + try // avoid throwing in destructor { if (!m_finished) MessageEnd(); } - catch (...) + catch (const Exception&) { } } @@ -2,9 +2,17 @@ #define CRYPTOPP_OBJFACT_H #include "cryptlib.h" +#include "misc.h" #include <map> #include <vector> +#if GCC_DIAGNOSTIC_AWARE +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-value" +# pragma GCC diagnostic ignored "-Wunused-variable" +# pragma GCC diagnostic ignored "-Wunused-parameter" +#endif + NAMESPACE_BEGIN(CryptoPP) //! _ @@ -133,4 +141,8 @@ void RegisterAuthenticatedSymmetricCipherDefaultFactories(const char *name=NULL, NAMESPACE_END +#if GCC_DIAGNOSTIC_AWARE +# pragma GCC diagnostic push +#endif + #endif diff --git a/fips140.cpp b/fips140.cpp index 1fcf5901..17e91eee 100644 --- a/fips140.cpp +++ b/fips140.cpp @@ -5,8 +5,15 @@ #ifndef CRYPTOPP_IMPORTS #include "fips140.h" +#include "misc.h" #include "trdlocal.h" // needs to be included last for cygwin +#if GCC_DIAGNOSTIC_AWARE +# pragma GCC diagnostic ignored "-Wunused-value" +# pragma GCC diagnostic ignored "-Wunused-variable" +# pragma GCC diagnostic ignored "-Wunused-parameter" +#endif + NAMESPACE_BEGIN(CryptoPP) // Define this to 1 to turn on FIPS 140-2 compliance features, including additional tests during @@ -15,7 +15,7 @@ public: GF256(byte modulus) : m_modulus(modulus) {} Element RandomElement(RandomNumberGenerator &rng, int ignored = 0) const - {return rng.GenerateByte();} + {CRYPTOPP_UNUSED(ignored);return rng.GenerateByte();} bool Equal(Element a, Element b) const {return a==b;} @@ -39,7 +39,7 @@ public: {return a^=b;} Element Double(Element a) const - {return 0;} + {CRYPTOPP_UNUSED(a);return 0;} Element One() const {return 1;} @@ -2,6 +2,7 @@ #define CRYPTOPP_GF2_32_H #include "cryptlib.h" +#include "misc.h" NAMESPACE_BEGIN(CryptoPP) @@ -15,7 +16,7 @@ public: GF2_32(word32 modulus=0x0000008D) : m_modulus(modulus) {} Element RandomElement(RandomNumberGenerator &rng, int ignored = 0) const - {return rng.GenerateWord32();} + {CRYPTOPP_UNUSED(ignored);return rng.GenerateWord32();} bool Equal(Element a, Element b) const {return a==b;} @@ -39,7 +40,7 @@ public: {return a^=b;} Element Double(Element a) const - {return 0;} + {CRYPTOPP_UNUSED(a);return 0;} Element MultiplicativeIdentity() const {return 1;} @@ -2,6 +2,7 @@ #include "pch.h" #include "xtr.h" +#include "misc.h" #include "nbtheory.h" #include "algebra.cpp" |