Fix warnings.
authorBodo Möller <bodo@openssl.org>
Tue, 3 Apr 2001 14:03:47 +0000 (14:03 +0000)
committerBodo Möller <bodo@openssl.org>
Tue, 3 Apr 2001 14:03:47 +0000 (14:03 +0000)
crypto/ec/ec_mult.c
crypto/ec/ectest.c

index 27e9aadd67fef07542a5d70aaab82c95c5ac3d6f..63113e12600926a470a8ff4f47360368686058f1 100644 (file)
@@ -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;
                                }
index e221a322c0ef3c18443d70b06d6537e3011596df..6da5d4b2473a462183a2e497f56850e1cd00fa0e 100644 (file)
@@ -55,6 +55,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <time.h>