From: Thomas Pornin Date: Mon, 14 Aug 2017 12:15:13 +0000 (+0200) Subject: Some renaming to avoid spurious warnings on some old GCC versions. X-Git-Tag: v0.6~28 X-Git-Url: https://bearssl.org/gitweb//home/git/?a=commitdiff_plain;h=79eec9d9e36f9406cba99a1eb328d408f6f2d1ee;p=BearSSL Some renaming to avoid spurious warnings on some old GCC versions. --- diff --git a/src/ec/ec_p256_m31.c b/src/ec/ec_p256_m31.c index 0462c15..b9826c3 100644 --- a/src/ec/ec_p256_m31.c +++ b/src/ec/ec_p256_m31.c @@ -423,17 +423,17 @@ mul_f256(uint32_t *d, const uint32_t *a, const uint32_t *b) } for (i = 17; i >= 9; i --) { - uint64_t x; - - x = s[i]; - s[i - 1] += ARSHW(x, 2); - s[i - 2] += (x << 28) & 0x3FFFFFFF; - s[i - 2] -= ARSHW(x, 4); - s[i - 3] -= (x << 26) & 0x3FFFFFFF; - s[i - 5] -= ARSHW(x, 10); - s[i - 6] -= (x << 20) & 0x3FFFFFFF; - s[i - 8] += ARSHW(x, 16); - s[i - 9] += (x << 14) & 0x3FFFFFFF; + uint64_t y; + + y = s[i]; + s[i - 1] += ARSHW(y, 2); + s[i - 2] += (y << 28) & 0x3FFFFFFF; + s[i - 2] -= ARSHW(y, 4); + s[i - 3] -= (y << 26) & 0x3FFFFFFF; + s[i - 5] -= ARSHW(y, 10); + s[i - 6] -= (y << 20) & 0x3FFFFFFF; + s[i - 8] += ARSHW(y, 16); + s[i - 9] += (y << 14) & 0x3FFFFFFF; } /* diff --git a/src/int/i15_modpow2.c b/src/int/i15_modpow2.c index 37073a4..4b32118 100644 --- a/src/int/i15_modpow2.c +++ b/src/int/i15_modpow2.c @@ -134,11 +134,11 @@ br_i15_modpow_opt(uint16_t *x, br_i15_zero(t2, m[0]); base = t2 + mwlen; for (u = 1; u < ((uint32_t)1 << k); u ++) { - uint32_t m; + uint32_t mask; - m = -EQ(u, bits); + mask = -EQ(u, bits); for (v = 1; v < mwlen; v ++) { - t2[v] |= m & base[v]; + t2[v] |= mask & base[v]; } base += mwlen; } diff --git a/src/int/i31_modpow2.c b/src/int/i31_modpow2.c index 23ae0cd..0b8f8cf 100644 --- a/src/int/i31_modpow2.c +++ b/src/int/i31_modpow2.c @@ -134,11 +134,11 @@ br_i31_modpow_opt(uint32_t *x, br_i31_zero(t2, m[0]); base = t2 + mwlen; for (u = 1; u < ((uint32_t)1 << k); u ++) { - uint32_t m; + uint32_t mask; - m = -EQ(u, bits); + mask = -EQ(u, bits); for (v = 1; v < mwlen; v ++) { - t2[v] |= m & base[v]; + t2[v] |= mask & base[v]; } base += mwlen; } diff --git a/src/x509/x509_minimal.c b/src/x509/x509_minimal.c index 5da61e1..a8283e3 100644 --- a/src/x509/x509_minimal.c +++ b/src/x509/x509_minimal.c @@ -222,8 +222,13 @@ void br_x509_minimal_run(void *t0ctx); #include #endif +/* + * The T0 compiler will produce these prototypes declarations in the + * header. + * void br_x509_minimal_init_main(void *ctx); void br_x509_minimal_run(void *ctx); + */ /* see bearssl_x509.h */ void diff --git a/src/x509/x509_minimal.t0 b/src/x509/x509_minimal.t0 index 1b1f684..2104d2c 100644 --- a/src/x509/x509_minimal.t0 +++ b/src/x509/x509_minimal.t0 @@ -171,8 +171,13 @@ preamble { #include #endif +/* + * The T0 compiler will produce these prototypes declarations in the + * header. + * void br_x509_minimal_init_main(void *ctx); void br_x509_minimal_run(void *ctx); + */ /* see bearssl_x509.h */ void