Silence some warnings from pedantic static analysis tools, improve compatibility with C++.
C doesn't include the null in an array initilized from a string literal if it doesn't fit, in C++ this is invalid. The vararray style prototypes and init+calc also changed in this commit are not C89 enough for some tools.
This commit is contained in:
@@ -400,7 +400,9 @@ static void secp256k1_fe_sqr(secp256k1_fe_t *r, const secp256k1_fe_t *a) {
|
||||
}
|
||||
|
||||
static SECP256K1_INLINE void secp256k1_fe_storage_cmov(secp256k1_fe_storage_t *r, const secp256k1_fe_storage_t *a, int flag) {
|
||||
uint64_t mask0 = flag + ~((uint64_t)0), mask1 = ~mask0;
|
||||
uint64_t mask0, mask1;
|
||||
mask0 = flag + ~((uint64_t)0);
|
||||
mask1 = ~mask0;
|
||||
r->n[0] = (r->n[0] & mask0) | (a->n[0] & mask1);
|
||||
r->n[1] = (r->n[1] & mask0) | (a->n[1] & mask1);
|
||||
r->n[2] = (r->n[2] & mask0) | (a->n[2] & mask1);
|
||||
|
||||
Reference in New Issue
Block a user