summaryrefslogtreecommitdiffstats
path: root/crypto/bn
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2018-07-12 19:15:26 +0200
committerAndy Polyakov <appro@openssl.org>2018-07-14 13:44:24 +0200
commit5d1c09de1f2736e1d4b1877206d08455ec75f558 (patch)
tree0d903e7d24b9729cf982975042feea01d8f4d4e7 /crypto/bn
parent582ad5d4d9b7703eb089016935133e3a18ea8205 (diff)
bn/bn_lcl.h,bn_nist.c: addres strict warnings with -DBN_DEBUG.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/bn')
-rw-r--r--crypto/bn/bn_lcl.h9
-rw-r--r--crypto/bn/bn_nist.c2
2 files changed, 5 insertions, 6 deletions
diff --git a/crypto/bn/bn_lcl.h b/crypto/bn/bn_lcl.h
index 0d3a8bfd5d..d74b590841 100644
--- a/crypto/bn/bn_lcl.h
+++ b/crypto/bn/bn_lcl.h
@@ -151,7 +151,6 @@
* all operations manipulating the bit in question in non-BN_DEBUG build.
*/
# define BN_FLG_FIXED_TOP 0x10000
-# include <assert.h>
# ifdef BN_DEBUG_RAND
# define bn_pollute(a) \
do { \
@@ -175,10 +174,10 @@
do { \
const BIGNUM *_bnum2 = (a); \
if (_bnum2 != NULL) { \
- int top = _bnum2->top; \
- assert((top == 0 && !_bnum2->neg) || \
- (top && ((_bnum2->flags & BN_FLG_FIXED_TOP) \
- || _bnum2->d[top - 1] != 0))); \
+ int _top = _bnum2->top; \
+ (void)ossl_assert((_top == 0 && !_bnum2->neg) || \
+ (_top && ((_bnum2->flags & BN_FLG_FIXED_TOP) \
+ || _bnum2->d[_top - 1] != 0))); \
bn_pollute(_bnum2); \
} \
} while(0)
diff --git a/crypto/bn/bn_nist.c b/crypto/bn/bn_nist.c
index fcc2b77f45..4d71afda7e 100644
--- a/crypto/bn/bn_nist.c
+++ b/crypto/bn/bn_nist.c
@@ -254,7 +254,7 @@ static void nist_cp_bn_0(BN_ULONG *dst, const BN_ULONG *src, int top, int max)
int i;
#ifdef BN_DEBUG
- assert(top <= max);
+ (void)ossl_assert(top <= max);
#endif
for (i = 0; i < top; i++)
dst[i] = src[i];