Cleared -Wunused-but-set-variable for GCC when using word128

pull/398/head
Jeffrey Walton 2017-03-18 04:51:43 -04:00
parent 8ad6782bec
commit e6817b73e5
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 4 additions and 2 deletions

6
drbg.h
View File

@ -207,7 +207,7 @@ public:
//! </pre> //! </pre>
Hash_DRBG(const byte* entropy=NULLPTR, size_t entropyLength=STRENGTH, const byte* nonce=NULLPTR, Hash_DRBG(const byte* entropy=NULLPTR, size_t entropyLength=STRENGTH, const byte* nonce=NULLPTR,
size_t nonceLength=0, const byte* personalization=NULLPTR, size_t personalizationLength=0) size_t nonceLength=0, const byte* personalization=NULLPTR, size_t personalizationLength=0)
: NIST_DRBG(), m_reseed(0), m_c(SEEDLENGTH), m_v(SEEDLENGTH) : NIST_DRBG(), m_c(SEEDLENGTH), m_v(SEEDLENGTH), m_reseed(0)
{ {
if (entropy != NULLPTR && entropyLength != 0) if (entropy != NULLPTR && entropyLength != 0)
DRBG_Instantiate(entropy, entropyLength, nonce, nonceLength, personalization, personalizationLength); DRBG_Instantiate(entropy, entropyLength, nonce, nonceLength, personalization, personalizationLength);
@ -321,7 +321,7 @@ public:
//! </pre> //! </pre>
HMAC_DRBG(const byte* entropy=NULLPTR, size_t entropyLength=STRENGTH, const byte* nonce=NULLPTR, HMAC_DRBG(const byte* entropy=NULLPTR, size_t entropyLength=STRENGTH, const byte* nonce=NULLPTR,
size_t nonceLength=0, const byte* personalization=NULLPTR, size_t personalizationLength=0) size_t nonceLength=0, const byte* personalization=NULLPTR, size_t personalizationLength=0)
: NIST_DRBG(), m_reseed(0), m_k(HASH::DIGESTSIZE), m_v(HASH::DIGESTSIZE) : NIST_DRBG(), m_k(HASH::DIGESTSIZE), m_v(HASH::DIGESTSIZE), m_reseed(0)
{ {
if (entropy != NULLPTR && entropyLength != 0) if (entropy != NULLPTR && entropyLength != 0)
DRBG_Instantiate(entropy, entropyLength, nonce, nonceLength, personalization, personalizationLength); DRBG_Instantiate(entropy, entropyLength, nonce, nonceLength, personalization, personalizationLength);
@ -541,6 +541,8 @@ void Hash_DRBG<HASH, STRENGTH, SEEDLENGTH>::Hash_Generate(const byte* additional
i--; carry >>= 8; i--; carry >>= 8;
} }
// CRYPTOPP_WORD128_AVAILABLE causes -Wunused-but-set-variable
CRYPTOPP_UNUSED(k);
} }
m_reseed++; m_reseed++;