mp_balance_mul: fix compiler warnings
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
diff --git a/bn_mp_balance_mul.c b/bn_mp_balance_mul.c
index dcbb933..17ddedf 100644
--- a/bn_mp_balance_mul.c
+++ b/bn_mp_balance_mul.c
@@ -26,12 +26,12 @@ int mp_balance_mul (mp_int * a, mp_int * b, mp_int * c)
* Ruby core; namely, function 'bigmul1_balance'
* from 'bignum.c'
*/
- mp_int t1, t2, tmp;
+ mp_int t1, t2;
long i, an, bn, r, n;
- int res, olduse, min, max;
+ int res, min, max;
int err = MP_MEM;
- mp_digit *bds, *cds, *t1ds;
+ mp_digit *bds, *t1ds;
an = a->used;
bn = b->used;
@@ -44,7 +44,6 @@ int mp_balance_mul (mp_int * a, mp_int * b, mp_int * c)
}
bds = b->dp;
- cds = c->dp;
t1ds = t1.dp;
n = 0;
@@ -70,17 +69,17 @@ int mp_balance_mul (mp_int * a, mp_int * b, mp_int * c)
}
register mp_digit u, *tmpx, *tmpt2, *tmpcn;
- register int i;
+ register int j;
tmpx = tmpcn = x.dp; tmpt2 = t2.dp;
u = 0;
- for (i = 0; i < min; i++) {
+ for (j = 0; j < min; j++) {
*tmpcn = *tmpx++ + *tmpt2++ + u;
u = *tmpcn >> ((mp_digit)DIGIT_BIT);
*tmpcn++ &= MP_MASK;
}
if (min != max) {
- for (; i < max; i++) {
- *tmpcn = x.dp[i] + u;
+ for (; j < max; j++) {
+ *tmpcn = x.dp[j] + u;
u = *tmpcn >> ((mp_digit)DIGIT_BIT);
*tmpcn++ &= MP_MASK;
}