aboutsummaryrefslogtreecommitdiff
path: root/src/ext
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-08-26 10:14:18 -0400
committerNick Mathewson <nickm@torproject.org>2014-08-26 10:14:18 -0400
commit8594e97c0350abb2a0214c848b712e6e68cde3e5 (patch)
tree3779b93e8efa164aa26e8d345638905a6556e674 /src/ext
parent4847136d2c56217f639875f168892eac6e914fec (diff)
downloadtor-8594e97c0350abb2a0214c848b712e6e68cde3e5.tar.gz
tor-8594e97c0350abb2a0214c848b712e6e68cde3e5.zip
Add some explicit casts as needed to make ed25519_ref10 compile
Apparently, ref10 likes implicit conversions from int64 to int32 more than our warnings do.
Diffstat (limited to 'src/ext')
-rw-r--r--src/ext/ed25519/ref10/fe_frombytes.c20
-rw-r--r--src/ext/ed25519/ref10/fe_mul.c20
-rw-r--r--src/ext/ed25519/ref10/fe_sq.c20
-rw-r--r--src/ext/ed25519/ref10/fe_sq2.c20
4 files changed, 40 insertions, 40 deletions
diff --git a/src/ext/ed25519/ref10/fe_frombytes.c b/src/ext/ed25519/ref10/fe_frombytes.c
index 5c17917487..87e249427a 100644
--- a/src/ext/ed25519/ref10/fe_frombytes.c
+++ b/src/ext/ed25519/ref10/fe_frombytes.c
@@ -60,14 +60,14 @@ void fe_frombytes(fe h,const unsigned char *s)
carry6 = (h6 + (crypto_int64) (1<<25)) >> 26; h7 += carry6; h6 -= carry6 << 26;
carry8 = (h8 + (crypto_int64) (1<<25)) >> 26; h9 += carry8; h8 -= carry8 << 26;
- h[0] = h0;
- h[1] = h1;
- h[2] = h2;
- h[3] = h3;
- h[4] = h4;
- h[5] = h5;
- h[6] = h6;
- h[7] = h7;
- h[8] = h8;
- h[9] = h9;
+ h[0] = (crypto_int32) h0;
+ h[1] = (crypto_int32) h1;
+ h[2] = (crypto_int32) h2;
+ h[3] = (crypto_int32) h3;
+ h[4] = (crypto_int32) h4;
+ h[5] = (crypto_int32) h5;
+ h[6] = (crypto_int32) h6;
+ h[7] = (crypto_int32) h7;
+ h[8] = (crypto_int32) h8;
+ h[9] = (crypto_int32) h9;
}
diff --git a/src/ext/ed25519/ref10/fe_mul.c b/src/ext/ed25519/ref10/fe_mul.c
index 26ca8b3682..d68e21018a 100644
--- a/src/ext/ed25519/ref10/fe_mul.c
+++ b/src/ext/ed25519/ref10/fe_mul.c
@@ -240,14 +240,14 @@ void fe_mul(fe h,const fe f,const fe g)
/* |h0| <= 2^25; from now on fits into int32 unchanged */
/* |h1| <= 1.01*2^24 */
- h[0] = h0;
- h[1] = h1;
- h[2] = h2;
- h[3] = h3;
- h[4] = h4;
- h[5] = h5;
- h[6] = h6;
- h[7] = h7;
- h[8] = h8;
- h[9] = h9;
+ h[0] = (crypto_int32) h0;
+ h[1] = (crypto_int32) h1;
+ h[2] = (crypto_int32) h2;
+ h[3] = (crypto_int32) h3;
+ h[4] = (crypto_int32) h4;
+ h[5] = (crypto_int32) h5;
+ h[6] = (crypto_int32) h6;
+ h[7] = (crypto_int32) h7;
+ h[8] = (crypto_int32) h8;
+ h[9] = (crypto_int32) h9;
}
diff --git a/src/ext/ed25519/ref10/fe_sq.c b/src/ext/ed25519/ref10/fe_sq.c
index 8dd119841c..54a39496e2 100644
--- a/src/ext/ed25519/ref10/fe_sq.c
+++ b/src/ext/ed25519/ref10/fe_sq.c
@@ -136,14 +136,14 @@ void fe_sq(fe h,const fe f)
carry0 = (h0 + (crypto_int64) (1<<25)) >> 26; h1 += carry0; h0 -= carry0 << 26;
- h[0] = h0;
- h[1] = h1;
- h[2] = h2;
- h[3] = h3;
- h[4] = h4;
- h[5] = h5;
- h[6] = h6;
- h[7] = h7;
- h[8] = h8;
- h[9] = h9;
+ h[0] = (crypto_int32) h0;
+ h[1] = (crypto_int32) h1;
+ h[2] = (crypto_int32) h2;
+ h[3] = (crypto_int32) h3;
+ h[4] = (crypto_int32) h4;
+ h[5] = (crypto_int32) h5;
+ h[6] = (crypto_int32) h6;
+ h[7] = (crypto_int32) h7;
+ h[8] = (crypto_int32) h8;
+ h[9] = (crypto_int32) h9;
}
diff --git a/src/ext/ed25519/ref10/fe_sq2.c b/src/ext/ed25519/ref10/fe_sq2.c
index 026ed3aacf..01b149f58d 100644
--- a/src/ext/ed25519/ref10/fe_sq2.c
+++ b/src/ext/ed25519/ref10/fe_sq2.c
@@ -147,14 +147,14 @@ void fe_sq2(fe h,const fe f)
carry0 = (h0 + (crypto_int64) (1<<25)) >> 26; h1 += carry0; h0 -= carry0 << 26;
- h[0] = h0;
- h[1] = h1;
- h[2] = h2;
- h[3] = h3;
- h[4] = h4;
- h[5] = h5;
- h[6] = h6;
- h[7] = h7;
- h[8] = h8;
- h[9] = h9;
+ h[0] = (crypto_int32) h0;
+ h[1] = (crypto_int32) h1;
+ h[2] = (crypto_int32) h2;
+ h[3] = (crypto_int32) h3;
+ h[4] = (crypto_int32) h4;
+ h[5] = (crypto_int32) h5;
+ h[6] = (crypto_int32) h6;
+ h[7] = (crypto_int32) h7;
+ h[8] = (crypto_int32) h8;
+ h[9] = (crypto_int32) h9;
}