Skip to content

Commit 95bc90a

Browse files
committed
Clear unused warnings with MSVC
1 parent 3185e93 commit 95bc90a

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

chacha.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@ std::string ChaChaTLS_Policy::AlgorithmProvider() const
414414
void ChaChaTLS_Policy::CipherSetKey(const NameValuePairs &params, const byte *key, size_t length)
415415
{
416416
CRYPTOPP_ASSERT(key); CRYPTOPP_ASSERT(length == 32);
417+
CRYPTOPP_UNUSED(length);
417418

418419
// ChaChaTLS is always 20 rounds. Fetch Rounds() to avoid a spurious failure.
419420
int rounds = params.GetIntValueWithDefault(Name::Rounds(), ROUNDS);
@@ -509,6 +510,7 @@ std::string XChaCha20_Policy::AlgorithmProvider() const
509510
void XChaCha20_Policy::CipherSetKey(const NameValuePairs &params, const byte *key, size_t length)
510511
{
511512
CRYPTOPP_ASSERT(key); CRYPTOPP_ASSERT(length == 32);
513+
CRYPTOPP_UNUSED(length);
512514

513515
// Use previous rounds as the default value
514516
int rounds = params.GetIntValueWithDefault(Name::Rounds(), m_rounds);

poly1305.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ void Poly1305_Base<T>::Restart()
314314

315315
void Poly1305TLS_Base::UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs &params)
316316
{
317-
CRYPTOPP_UNUSED(params);
317+
CRYPTOPP_UNUSED(params); CRYPTOPP_UNUSED(length);
318318
CRYPTOPP_ASSERT(key && length >= 32);
319319

320320
// key is {r,s} pair. r is the additional key that gets clamped, s is the nonce.

xed25519.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -870,6 +870,7 @@ bool ed25519Verifier::VerifyAndRestart(PK_MessageAccumulator &messageAccumulator
870870
bool ed25519Verifier::VerifyStream(std::istream& stream, const byte *signature, size_t signatureLen) const
871871
{
872872
CRYPTOPP_ASSERT(signatureLen == SIGNATURE_LENGTH);
873+
CRYPTOPP_UNUSED(signatureLen);
873874

874875
const ed25519PublicKey& pk = static_cast<const ed25519PublicKey&>(GetPublicKey());
875876
int ret = Donna::ed25519_sign_open(stream, pk.GetPublicKeyBytePtr(), signature);

0 commit comments

Comments
 (0)