Cleared "unused parameter" warning with GCC 5.1 and -Wextra
parent
db40142116
commit
20e652abbb
|
|
@ -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;
|
||||
|
|
|
|||
8
asn.cpp
8
asn.cpp
|
|
@ -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&)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
|||
12
factory.h
12
factory.h
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
4
gf256.h
4
gf256.h
|
|
@ -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;}
|
||||
|
|
|
|||
5
gf2_32.h
5
gf2_32.h
|
|
@ -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;}
|
||||
|
|
|
|||
Loading…
Reference in New Issue