From: Emilia Kasper Date: Mon, 15 Dec 2014 12:11:52 +0000 (+0100) Subject: Fix unused variable warning X-Git-Tag: OpenSSL_1_0_1k~52 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=458f23f61021da8badf2457db0608232b3c8bec4;p=oweals%2Fopenssl.git 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 (cherry picked from commit 6af16ec5eed85390bcbd004806a842d6153d6a31) --- diff --git a/crypto/bn/bn.h b/crypto/bn/bn.h index 21a1a3fe35..c4d618522e 100644 --- a/crypto/bn/bn.h +++ b/crypto/bn/bn.h @@ -780,7 +780,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 */