提交 413a4a04 编写于 作者: B Bodo Möller

Fix warnings.

上级 a95d2c51
......@@ -206,7 +206,7 @@ int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
bits = i < num ? BN_num_bits(scalars[i]) : BN_num_bits(scalar);
wsize[i] = EC_window_bits_for_scalar_size(bits);
num_val += 1 << (wsize[i] - 1);
num_val += 1u << (wsize[i] - 1);
if (bits > max_bits)
max_bits = bits;
wbits[i] = 0;
......@@ -227,7 +227,7 @@ int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
for (i = 0; i < totalnum; i++)
{
val_sub[i] = v;
for (j = 0; j < (1 << (wsize[i] - 1)); j++)
for (j = 0; j < (1u << (wsize[i] - 1)); j++)
{
*v = EC_POINT_new(group);
if (*v == NULL) goto err;
......@@ -278,7 +278,7 @@ int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
if (wsize[i] > 1)
{
if (!EC_POINT_dbl(group, tmp, val_sub[i][0], ctx)) goto err;
for (j = 1; j < (1 << (wsize[i] - 1)); j++)
for (j = 1; j < (1u << (wsize[i] - 1)); j++)
{
if (!EC_POINT_add(group, val_sub[i][j], val_sub[i][j - 1], tmp, ctx)) goto err;
}
......
......@@ -55,6 +55,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册