From 5f25c7363534656ce6e1ecac63ca694e6d4ba7d6 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Thu, 4 Jun 2015 23:24:15 -0400 Subject: [PATCH] Add CRYPTOPP_UNUSED to help supress unused variable warnings. Applied to AlgorithmParametersTemplate because its use is nearly ubiquitous --- algparam.h | 1 + config.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/algparam.h b/algparam.h index ea5129c2..6a227407 100644 --- a/algparam.h +++ b/algparam.h @@ -320,6 +320,7 @@ public: void MoveInto(void *buffer) const { AlgorithmParametersTemplate* p = new(buffer) AlgorithmParametersTemplate(*this); + CRYPTOPP_UNUSED(p); } protected: diff --git a/config.h b/config.h index 4554a1c7..a50f5772 100644 --- a/config.h +++ b/config.h @@ -94,6 +94,8 @@ typedef unsigned char byte; // put in global namespace to avoid ambiguity with other byte typedefs +#define CRYPTOPP_UNUSED(x) ((void)x); // cast to void. Portable way to suppress unused variable + NAMESPACE_BEGIN(CryptoPP) typedef unsigned short word16;