summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornoloader <noloader@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2015-06-29 00:45:59 +0000
committernoloader <noloader@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2015-06-29 00:45:59 +0000
commit0ff3516b7f852ff219177ce143301c836d0f6d1e (patch)
tree3ea6b1e00ccefd25bcf8e2b212c214f5400e96cc
parenta33cc753951d6b9af8a620a7717dcc4b08849f19 (diff)
downloadcryptopp-0ff3516b7f852ff219177ce143301c836d0f6d1e.tar.gz
Add CRYPTOPP_UNUSED to help supress unused variable warnings. Applied AlgorithmParametersTemplate because its use is nearly ubiquitous
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@550 57ff6487-cd31-0410-9ec3-f628ee90f5f0
-rw-r--r--algparam.h1
-rw-r--r--config.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/algparam.h b/algparam.h
index ea5129c..6a22740 100644
--- a/algparam.h
+++ b/algparam.h
@@ -320,6 +320,7 @@ public:
void MoveInto(void *buffer) const
{
AlgorithmParametersTemplate<T>* p = new(buffer) AlgorithmParametersTemplate<T>(*this);
+ CRYPTOPP_UNUSED(p);
}
protected:
diff --git a/config.h b/config.h
index 4554a1c..77c34b9 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;