Add explicit cast to supress conversion warning.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jeroen Leenarts 2018-09-26 11:22:15 +02:00
parent a55eefcd5d
commit cc4bd254a2
1 changed files with 4 additions and 4 deletions

View File

@ -134,8 +134,8 @@ static void curve25519_shared_secret(uint8_t shared_secret[32], const uint8_t pr
for (i = 254; i >= 0; --i) { for (i = 254; i >= 0; --i) {
r = (z[i >> 3] >> (i & 7)) & 1; r = (z[i >> 3] >> (i & 7)) & 1;
cswap(a, b, r); cswap(a, b, (int)r);
cswap(c, d, r); cswap(c, d, (int)r);
add(e, a, c); add(e, a, c);
subtract(a, a, c); subtract(a, a, c);
add(c, b, d); add(c, b, d);
@ -154,8 +154,8 @@ static void curve25519_shared_secret(uint8_t shared_secret[32], const uint8_t pr
multmod(a, d, f); multmod(a, d, f);
multmod(d, b, x); multmod(d, b, x);
multmod(b, e, e); multmod(b, e, e);
cswap(a, b, r); cswap(a, b, (int)r);
cswap(c, d, r); cswap(c, d, (int)r);
} }
invert(c, c); invert(c, c);
multmod(a, a, c); multmod(a, a, c);