Cleared unused variable and function warnings
parent
41be55ca17
commit
8f59d9af35
2
3way.cpp
2
3way.cpp
|
|
@ -15,7 +15,7 @@ void ThreeWay_TestInstantiations()
|
||||||
|
|
||||||
static const word32 START_E = 0x0b0b; // round constant of first encryption round
|
static const word32 START_E = 0x0b0b; // round constant of first encryption round
|
||||||
static const word32 START_D = 0xb1b1; // round constant of first decryption round
|
static const word32 START_D = 0xb1b1; // round constant of first decryption round
|
||||||
static const word32 RC_MODULUS = 0x11011;
|
// static const word32 RC_MODULUS = 0x11011;
|
||||||
|
|
||||||
static inline word32 reverseBits(word32 a)
|
static inline word32 reverseBits(word32 a)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
3
asn.cpp
3
asn.cpp
|
|
@ -348,6 +348,9 @@ void EncodedObjectFilter::Put(const byte *inString, size_t length)
|
||||||
|
|
||||||
if (m_lengthRemaining == 0)
|
if (m_lengthRemaining == 0)
|
||||||
m_state = IDENTIFIER;
|
m_state = IDENTIFIER;
|
||||||
|
|
||||||
|
case TAIL: case ALL_DONE: ;;
|
||||||
|
default: ;;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_state == IDENTIFIER && m_level == 0)
|
if (m_state == IDENTIFIER && m_level == 0)
|
||||||
|
|
|
||||||
|
|
@ -640,7 +640,7 @@ void OutputPair(const NameValuePairs &v, const char *name)
|
||||||
{
|
{
|
||||||
Integer x;
|
Integer x;
|
||||||
bool b = v.GetValue(name, x);
|
bool b = v.GetValue(name, x);
|
||||||
assert(b);
|
assert(b); CRYPTOPP_UNUSED(b);
|
||||||
cout << name << ": \\\n ";
|
cout << name << ": \\\n ";
|
||||||
x.Encode(HexEncoder(new FileSink(cout), false, 64, "\\\n ").Ref(), x.MinEncodedSize());
|
x.Encode(HexEncoder(new FileSink(cout), false, 64, "\\\n ").Ref(), x.MinEncodedSize());
|
||||||
cout << endl;
|
cout << endl;
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ extern "C" {_CRTIMP void __cdecl _CRT_DEBUGGER_HOOK(int);}
|
||||||
#if GCC_DIAGNOSTIC_AWARE
|
#if GCC_DIAGNOSTIC_AWARE
|
||||||
# pragma GCC diagnostic ignored "-Wunused-value"
|
# pragma GCC diagnostic ignored "-Wunused-value"
|
||||||
# pragma GCC diagnostic ignored "-Wunused-variable"
|
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||||
|
# pragma GCC diagnostic ignored "-Wunneeded-internal-declaration"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
NAMESPACE_BEGIN(CryptoPP)
|
NAMESPACE_BEGIN(CryptoPP)
|
||||||
|
|
|
||||||
9
hkdf.h
9
hkdf.h
|
|
@ -10,6 +10,11 @@
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
|
#if GCC_DIAGNOSTIC_AWARE
|
||||||
|
# pragma GCC diagnostic push
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||||
|
#endif
|
||||||
|
|
||||||
NAMESPACE_BEGIN(CryptoPP)
|
NAMESPACE_BEGIN(CryptoPP)
|
||||||
|
|
||||||
//! abstract base class for key derivation function
|
//! abstract base class for key derivation function
|
||||||
|
|
@ -84,4 +89,8 @@ unsigned int HKDF<T>::DeriveKey(byte *derived, size_t derivedLen, const byte *se
|
||||||
|
|
||||||
NAMESPACE_END
|
NAMESPACE_END
|
||||||
|
|
||||||
|
#if GCC_DIAGNOSTIC_AWARE
|
||||||
|
# pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // CRYPTOPP_HASH_KEY_DERIVATION_FUNCTION_H
|
#endif // CRYPTOPP_HASH_KEY_DERIVATION_FUNCTION_H
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@ lword LimitedBandwidth::ComputeCurrentTransceiveLimit()
|
||||||
return ULONG_MAX;
|
return ULONG_MAX;
|
||||||
|
|
||||||
double curTime = GetCurTimeAndCleanUp();
|
double curTime = GetCurTimeAndCleanUp();
|
||||||
|
CRYPTOPP_UNUSED(curTime);
|
||||||
|
|
||||||
lword total = 0;
|
lword total = 0;
|
||||||
for (OpQueue::size_type i=0; i!=m_ops.size(); ++i)
|
for (OpQueue::size_type i=0; i!=m_ops.size(); ++i)
|
||||||
total += m_ops[i].second;
|
total += m_ops[i].second;
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,11 @@ being unloaded from L1 cache, until that round is finished.
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
|
|
||||||
|
#if GCC_DIAGNOSTIC_AWARE
|
||||||
|
# pragma GCC diagnostic push
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-function"
|
||||||
|
#endif
|
||||||
|
|
||||||
NAMESPACE_BEGIN(CryptoPP)
|
NAMESPACE_BEGIN(CryptoPP)
|
||||||
|
|
||||||
#ifdef CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS
|
#ifdef CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS
|
||||||
|
|
@ -1259,5 +1264,9 @@ size_t Rijndael::Dec::AdvancedProcessBlocks(const byte *inBlocks, const byte *xo
|
||||||
|
|
||||||
NAMESPACE_END
|
NAMESPACE_END
|
||||||
|
|
||||||
|
#if GCC_DIAGNOSTIC_AWARE
|
||||||
|
# pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
2
rw.cpp
2
rw.cpp
|
|
@ -11,7 +11,9 @@
|
||||||
|
|
||||||
#ifndef CRYPTOPP_IMPORTS
|
#ifndef CRYPTOPP_IMPORTS
|
||||||
|
|
||||||
|
#ifdef _OPENMP
|
||||||
static const bool CRYPTOPP_RW_USE_OMP = false;
|
static const bool CRYPTOPP_RW_USE_OMP = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
NAMESPACE_BEGIN(CryptoPP)
|
NAMESPACE_BEGIN(CryptoPP)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -286,6 +286,7 @@ bool TestOS_RNG()
|
||||||
RandomNumberSource test(*rng, UINT_MAX, false, new Deflator(new Redirector(meter)));
|
RandomNumberSource test(*rng, UINT_MAX, false, new Deflator(new Redirector(meter)));
|
||||||
unsigned long total=0, length=0;
|
unsigned long total=0, length=0;
|
||||||
time_t t = time(NULL), t1 = 0;
|
time_t t = time(NULL), t1 = 0;
|
||||||
|
CRYPTOPP_UNUSED(length);
|
||||||
|
|
||||||
// check that it doesn't take too long to generate a reasonable amount of randomness
|
// check that it doesn't take too long to generate a reasonable amount of randomness
|
||||||
while (total < 16 && (t1 < 10 || total*8 > (unsigned long)t1))
|
while (total < 16 && (t1 < 10 || total*8 > (unsigned long)t1))
|
||||||
|
|
|
||||||
4
xtr.cpp
4
xtr.cpp
|
|
@ -27,9 +27,9 @@ void XTR_FindPrimesAndGenerator(RandomNumberGenerator &rng, Integer &p, Integer
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
bool qFound = q.Randomize(rng, minQ, maxQ, Integer::PRIME, 7, 12);
|
bool qFound = q.Randomize(rng, minQ, maxQ, Integer::PRIME, 7, 12);
|
||||||
assert(qFound);
|
assert(qFound); CRYPTOPP_UNUSED(qFound);
|
||||||
bool solutionsExist = SolveModularQuadraticEquation(r1, r2, 1, -1, 1, q);
|
bool solutionsExist = SolveModularQuadraticEquation(r1, r2, 1, -1, 1, q);
|
||||||
assert(solutionsExist);
|
assert(solutionsExist); CRYPTOPP_UNUSED(solutionsExist);
|
||||||
} while (!p.Randomize(rng, minP, maxP, Integer::PRIME, CRT(rng.GenerateBit()?r1:r2, q, 2, 3, EuclideanMultiplicativeInverse(p, 3)), 3*q));
|
} while (!p.Randomize(rng, minP, maxP, Integer::PRIME, CRT(rng.GenerateBit()?r1:r2, q, 2, 3, EuclideanMultiplicativeInverse(p, 3)), 3*q));
|
||||||
assert(((p.Squared() - p + 1) % q).IsZero());
|
assert(((p.Squared() - p + 1) % q).IsZero());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ inline bool LowFirstBitReader::FillBuffer(unsigned int length)
|
||||||
inline unsigned long LowFirstBitReader::PeekBits(unsigned int length)
|
inline unsigned long LowFirstBitReader::PeekBits(unsigned int length)
|
||||||
{
|
{
|
||||||
bool result = FillBuffer(length);
|
bool result = FillBuffer(length);
|
||||||
assert(result);
|
assert(result); CRYPTOPP_UNUSED(result);
|
||||||
return m_buffer & (((unsigned long)1 << length) - 1);
|
return m_buffer & (((unsigned long)1 << length) - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue