From 95bc90adc4b4afb3408a9b7f29ff949b494a1e1c Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Fri, 22 Feb 2019 08:38:20 -0500 Subject: [PATCH] Clear unused warnings with MSVC --- chacha.cpp | 2 ++ poly1305.cpp | 2 +- xed25519.cpp | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/chacha.cpp b/chacha.cpp index e16a5008e..dccde3017 100644 --- a/chacha.cpp +++ b/chacha.cpp @@ -414,6 +414,7 @@ std::string ChaChaTLS_Policy::AlgorithmProvider() const void ChaChaTLS_Policy::CipherSetKey(const NameValuePairs ¶ms, const byte *key, size_t length) { CRYPTOPP_ASSERT(key); CRYPTOPP_ASSERT(length == 32); + CRYPTOPP_UNUSED(length); // ChaChaTLS is always 20 rounds. Fetch Rounds() to avoid a spurious failure. int rounds = params.GetIntValueWithDefault(Name::Rounds(), ROUNDS); @@ -509,6 +510,7 @@ std::string XChaCha20_Policy::AlgorithmProvider() const void XChaCha20_Policy::CipherSetKey(const NameValuePairs ¶ms, const byte *key, size_t length) { CRYPTOPP_ASSERT(key); CRYPTOPP_ASSERT(length == 32); + CRYPTOPP_UNUSED(length); // Use previous rounds as the default value int rounds = params.GetIntValueWithDefault(Name::Rounds(), m_rounds); diff --git a/poly1305.cpp b/poly1305.cpp index e22cb7f59..9f3f97aa4 100644 --- a/poly1305.cpp +++ b/poly1305.cpp @@ -314,7 +314,7 @@ void Poly1305_Base::Restart() void Poly1305TLS_Base::UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs ¶ms) { - CRYPTOPP_UNUSED(params); + CRYPTOPP_UNUSED(params); CRYPTOPP_UNUSED(length); CRYPTOPP_ASSERT(key && length >= 32); // key is {r,s} pair. r is the additional key that gets clamped, s is the nonce. diff --git a/xed25519.cpp b/xed25519.cpp index 0ab778769..426940501 100644 --- a/xed25519.cpp +++ b/xed25519.cpp @@ -870,6 +870,7 @@ bool ed25519Verifier::VerifyAndRestart(PK_MessageAccumulator &messageAccumulator bool ed25519Verifier::VerifyStream(std::istream& stream, const byte *signature, size_t signatureLen) const { CRYPTOPP_ASSERT(signatureLen == SIGNATURE_LENGTH); + CRYPTOPP_UNUSED(signatureLen); const ed25519PublicKey& pk = static_cast(GetPublicKey()); int ret = Donna::ed25519_sign_open(stream, pk.GetPublicKeyBytePtr(), signature);