From: Jeroen Leenarts Date: Wed, 26 Sep 2018 09:22:15 +0000 (+0200) Subject: Crypto: Curve25519: Add explicit cast to supress conversion warning. X-Git-Tag: 0.0.20181104-1~196 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5bfb6a2c139db06366acfdc5cabe07f13f276249;p=thirdparty%2Fwireguard-apple.git Crypto: Curve25519: Add explicit cast to supress conversion warning. Signed-off-by: Jason A. Donenfeld --- diff --git a/WireGuard/WireGuard/Crypto/x25519.c b/WireGuard/WireGuard/Crypto/x25519.c index b198ae0..bc94933 100644 --- a/WireGuard/WireGuard/Crypto/x25519.c +++ b/WireGuard/WireGuard/Crypto/x25519.c @@ -134,8 +134,8 @@ static void curve25519_shared_secret(uint8_t shared_secret[32], const uint8_t pr for (i = 254; i >= 0; --i) { r = (z[i >> 3] >> (i & 7)) & 1; - cswap(a, b, r); - cswap(c, d, r); + cswap(a, b, (int)r); + cswap(c, d, (int)r); add(e, a, c); subtract(a, a, c); 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(d, b, x); multmod(b, e, e); - cswap(a, b, r); - cswap(c, d, r); + cswap(a, b, (int)r); + cswap(c, d, (int)r); } invert(c, c); multmod(a, a, c);