From 413a4a046192456a50f24320c0cedc4a8c83cbe2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bodo=20M=C3=B6ller?= Date: Tue, 3 Apr 2001 14:03:47 +0000 Subject: [PATCH] Fix warnings. --- crypto/ec/ec_mult.c | 6 +++--- crypto/ec/ectest.c | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/crypto/ec/ec_mult.c b/crypto/ec/ec_mult.c index 27e9aadd67..63113e1260 100644 --- a/crypto/ec/ec_mult.c +++ b/crypto/ec/ec_mult.c @@ -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; } diff --git a/crypto/ec/ectest.c b/crypto/ec/ectest.c index e221a322c0..6da5d4b247 100644 --- a/crypto/ec/ectest.c +++ b/crypto/ec/ectest.c @@ -55,6 +55,7 @@ #include #include +#include #include -- 2.25.1