diff --git a/src/ecmult_gen_impl.h b/src/ecmult_gen_impl.h index 7079c31418..36a6fd9e82 100644 --- a/src/ecmult_gen_impl.h +++ b/src/ecmult_gen_impl.h @@ -80,7 +80,7 @@ static void secp256k1_ecmult_gen_start(void) { for (int j=0; j<64; j++) { for (int i=0; i<16; i++) { const unsigned char* raw = (const unsigned char*)(&prec[j*16 + i]); - for (int k=0; kprec[j][k][i] = raw[k]; } } @@ -105,7 +105,7 @@ static void secp256k1_ecmult_gen(secp256k1_gej_t *r, const secp256k1_scalar_t *g int bits; for (int j=0; j<64; j++) { bits = secp256k1_scalar_get_bits(gn, j * 4, 4); - for (int k=0; kprec[j][k][bits]; secp256k1_gej_add_ge(r, r, &add); } diff --git a/src/field_impl.h b/src/field_impl.h index 3223d53848..1e52343c8c 100644 --- a/src/field_impl.h +++ b/src/field_impl.h @@ -222,7 +222,7 @@ static void secp256k1_fe_inv_all(size_t len, secp256k1_fe_t r[len], const secp25 r[0] = a[0]; - int i = 0; + size_t i = 0; while (++i < len) { secp256k1_fe_mul(&r[i], &r[i - 1], &a[i]); } @@ -246,7 +246,7 @@ static void secp256k1_fe_inv_all_var(size_t len, secp256k1_fe_t r[len], const se r[0] = a[0]; - int i = 0; + size_t i = 0; while (++i < len) { secp256k1_fe_mul(&r[i], &r[i - 1], &a[i]); } diff --git a/src/group_impl.h b/src/group_impl.h index 9d10a64aad..7becd2c0e5 100644 --- a/src/group_impl.h +++ b/src/group_impl.h @@ -82,9 +82,9 @@ static void secp256k1_ge_set_gej_var(secp256k1_ge_t *r, secp256k1_gej_t *a) { } static void secp256k1_ge_set_all_gej_var(size_t len, secp256k1_ge_t r[len], const secp256k1_gej_t a[len]) { - int count = 0; + size_t count = 0; secp256k1_fe_t az[len]; - for (int i=0; i shift) { memcpy(r + rlen - len + shift, tmp + shift, len - shift);