summaryrefslogtreecommitdiffstats
path: root/crypto/bn
diff options
context:
space:
mode:
authorEmilia Kasper <emilia@openssl.org>2014-12-15 13:11:52 +0100
committerEmilia Kasper <emilia@openssl.org>2014-12-15 13:15:30 +0100
commit6af16ec5eed85390bcbd004806a842d6153d6a31 (patch)
treea896d83aa490747f59ff63b21d36487616920bf2 /crypto/bn
parentd04a1e0b5beb3329cdf8c4ec35b9113cbc41d2f2 (diff)
Fix unused variable warning
The temporary variable causes unused variable warnings in opt mode with clang, because the subsequent assert is compiled out. Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/bn')
-rw-r--r--crypto/bn/bn.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/bn/bn.h b/crypto/bn/bn.h
index 2e3fab98db..84cad1741e 100644
--- a/crypto/bn/bn.h
+++ b/crypto/bn/bn.h
@@ -762,7 +762,9 @@ int RAND_pseudo_bytes(unsigned char *buf,int num);
#define bn_wcheck_size(bn, words) \
do { \
const BIGNUM *_bnum2 = (bn); \
- assert(words <= (_bnum2)->dmax && words >= (_bnum2)->top); \
+ assert((words) <= (_bnum2)->dmax && (words) >= (_bnum2)->top); \
+ /* avoid unused variable warning with NDEBUG */ \
+ (void)(_bnum2); \
} while(0)
#else /* !BN_DEBUG */