Skip to content

Commit

Permalink
Add CRYPTOPP_UNUSED to help supress unused variable warnings. Applied…
Browse files Browse the repository at this point in the history
… to AlgorithmParametersTemplate because its use is nearly ubiquitous
  • Loading branch information
noloader committed Jun 5, 2015
1 parent 54d72d0 commit 5f25c73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions algparam.h
Expand Up @@ -320,6 +320,7 @@ class AlgorithmParametersTemplate : public AlgorithmParametersBase
void MoveInto(void *buffer) const
{
AlgorithmParametersTemplate<T>* p = new(buffer) AlgorithmParametersTemplate<T>(*this);
CRYPTOPP_UNUSED(p);
}

protected:
Expand Down
2 changes: 2 additions & 0 deletions config.h
Expand Up @@ -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;
Expand Down

1 comment on commit 5f25c73

@noloader
Copy link
Collaborator Author

@noloader noloader commented on 5f25c73 Sep 30, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#define CRYPTOPP_UNUSED(x) ((void)x); was later changed to #define CRYPTOPP_UNUSED(x) ((void)(x));.

Please sign in to comment.