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;
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;
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;
}