diff --git a/src/scalar_4x64_impl.h b/src/scalar_4x64_impl.h index b36e20d..760367c 100644 --- a/src/scalar_4x64_impl.h +++ b/src/scalar_4x64_impl.h @@ -179,7 +179,7 @@ static int secp256k1_scalar_is_high(const secp256k1_scalar_t *a) { /** Add a to the number defined by (c0,c1,c2). c2 must never overflow. */ #define sumadd(a) { \ c0 += (a); /* overflow is handled on the next line */ \ - int over = (c0 < (a)) ? 1 : 0; \ + unsigned int over = (c0 < (a)) ? 1 : 0; \ c1 += over; /* overflow is handled on the next line */ \ c2 += (c1 < over) ? 1 : 0; /* never overflows by contract */ \ } diff --git a/src/scalar_8x32_impl.h b/src/scalar_8x32_impl.h index 28a6cee..dc148d7 100644 --- a/src/scalar_8x32_impl.h +++ b/src/scalar_8x32_impl.h @@ -235,7 +235,7 @@ static int secp256k1_scalar_is_high(const secp256k1_scalar_t *a) { /** Add a to the number defined by (c0,c1,c2). c2 must never overflow. */ #define sumadd(a) { \ c0 += (a); /* overflow is handled on the next line */ \ - int over = (c0 < (a)) ? 1 : 0; \ + unsigned int over = (c0 < (a)) ? 1 : 0; \ c1 += over; /* overflow is handled on the next line */ \ c2 += (c1 < over) ? 1 : 0; /* never overflows by contract */ \ }