diff options
author | Jeffrey Walton <noloader@gmail.com> | 2015-07-23 14:21:06 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2015-07-23 14:21:06 -0400 |
commit | 07e831947832804cbe7bc22756dd6c8403f24f36 (patch) | |
tree | af3f5de03c4e1fe9cc2b5b75f9b201bcdeba73ee /eccrypto.cpp | |
parent | b2d9be1b80a66b939af3921f52a760c28859df8f (diff) | |
download | cryptopp-git-07e831947832804cbe7bc22756dd6c8403f24f36.tar.gz |
Cleared "unused function" warning when using GCC with -Wall
Diffstat (limited to 'eccrypto.cpp')
-rw-r--r-- | eccrypto.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/eccrypto.cpp b/eccrypto.cpp index fe77d2bc..66c978b8 100644 --- a/eccrypto.cpp +++ b/eccrypto.cpp @@ -11,6 +11,7 @@ #include "argnames.h" #include "ec2n.h" #include "misc.h" +#include "trap.h" #if GCC_DIAGNOSTIC_AWARE # pragma GCC diagnostic ignored "-Wunused-function" @@ -32,8 +33,7 @@ static void ECDSA_TestInstantiations() } #endif -// VC60 workaround: complains when these functions are put into an anonymous namespace -static Integer ConvertToInteger(const PolynomialMod2 &x) +static inline Integer ConvertToInteger(const PolynomialMod2 &x) { unsigned int l = x.ByteCount(); SecByteBlock temp(l); @@ -118,7 +118,10 @@ struct OIDLessThan inline bool operator()(const EcRecommendedParameters<T>& a, const EcRecommendedParameters<T>& b) {return a.oid < b.oid;} }; -static void GetRecommendedParameters(const EcRecommendedParameters<EC2N> *&begin, const EcRecommendedParameters<EC2N> *&end) +// Declare it so we can attach the attribute +static void GetRecommendedParameters(const EcRecommendedParameters<EC2N> *&begin, const EcRecommendedParameters<EC2N> *&end) CRYPTOPP_UNUSED_FUNCTION; + +void GetRecommendedParameters(const EcRecommendedParameters<EC2N> *&begin, const EcRecommendedParameters<EC2N> *&end) { // this array must be sorted by OID static const EcRecommendedParameters<EC2N> rec[] = { @@ -253,7 +256,10 @@ static void GetRecommendedParameters(const EcRecommendedParameters<EC2N> *&begin end = rec + COUNTOF(rec); } -static void GetRecommendedParameters(const EcRecommendedParameters<ECP> *&begin, const EcRecommendedParameters<ECP> *&end) +// Declare it so we can attach the unused attribute +static void GetRecommendedParameters(const EcRecommendedParameters<ECP> *&begin, const EcRecommendedParameters<ECP> *&end) CRYPTOPP_UNUSED_FUNCTION; + +void GetRecommendedParameters(const EcRecommendedParameters<ECP> *&begin, const EcRecommendedParameters<ECP> *&end) { // this array must be sorted by OID static const EcRecommendedParameters<ECP> rec[] = { |