aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/math
diff options
context:
space:
mode:
authorRenĂ© Korthaus <[email protected]>2016-02-18 15:54:37 +0100
committerRenĂ© Korthaus <[email protected]>2016-02-18 16:13:55 +0100
commit3a8dcbed75892ee63d73e9f9310f811e6267e504 (patch)
tree7553c5eb2936898d65b89b2407d016306d257dd1 /src/lib/math
parent0c76098cbaa8002fb89756d6fa2b02359f3f5f88 (diff)
Fix remaining Wshadow warnings and enable on gcc and clang
Diffstat (limited to 'src/lib/math')
-rw-r--r--src/lib/math/ec_gfp/curve_nistp.cpp7
-rw-r--r--src/lib/math/ec_gfp/point_gfp.cpp4
2 files changed, 7 insertions, 4 deletions
diff --git a/src/lib/math/ec_gfp/curve_nistp.cpp b/src/lib/math/ec_gfp/curve_nistp.cpp
index 6a98d9588..c153340e9 100644
--- a/src/lib/math/ec_gfp/curve_nistp.cpp
+++ b/src/lib/math/ec_gfp/curve_nistp.cpp
@@ -32,8 +32,11 @@ void normalize(const BigInt& p, BigInt& x, secure_vector<word>& ws, size_t bound
const word* xd = x.data();
word borrow = 0;
- for(size_t i = 0; i != p_words; ++i)
- ws[i] = word_sub(xd[i], prime[i], &borrow);
+ for(size_t j = 0; j != p_words; ++j)
+ {
+ ws[j] = word_sub(xd[j], prime[j], &borrow);
+ }
+
ws[p_words] = word_sub(xd[p_words], 0, &borrow);
if(borrow)
diff --git a/src/lib/math/ec_gfp/point_gfp.cpp b/src/lib/math/ec_gfp/point_gfp.cpp
index 5e8b3b4ef..f15911db0 100644
--- a/src/lib/math/ec_gfp/point_gfp.cpp
+++ b/src/lib/math/ec_gfp/point_gfp.cpp
@@ -421,8 +421,8 @@ PointGFp Blinded_Point_Multiply::blinded_multiply(const BigInt& scalar_in,
for(size_t i = 0; i != m_h; ++i)
R.mult2(m_ws);
- const u32bit nibble = scalar.get_substring((windows-1)*m_h, m_h);
- R.add(m_U[nibble], m_ws);
+ const u32bit inner_nibble = scalar.get_substring((windows-1)*m_h, m_h);
+ R.add(m_U[inner_nibble], m_ws);
windows--;
}
}