提交 5d1c09de 编写于 作者: A Andy Polyakov

bn/bn_lcl.h,bn_nist.c: addres strict warnings with -DBN_DEBUG.

Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 582ad5d4
......@@ -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)
......
......@@ -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];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册