summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-12 09:16:15 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-12 09:16:15 +0000
commitd1abc53721a15bd545b60c875b05f28dd7e01e57 (patch)
tree44da5708baceb68988497901e3915fbcece7c02d /util.c
parent080525aa68c68df1fd4c1484bea1de88e3c1f79f (diff)
* array.c, bignum.c, dln.c, error.c, gc.c, io.c, marshal.c,
numeric.c, pack.c, strftime.c, string.c, thread.c, transcode.c, transcode_data.h, util.c, variable.c, vm_dump.c, include/ruby/encoding.h, missing/crypt.c, missing/vsnprintf.c: suppress VC type warnings. [ruby-core:22726] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'util.c')
-rw-r--r--util.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/util.c b/util.c
index 97504ffff4..b802202e9d 100644
--- a/util.c
+++ b/util.c
@@ -1170,11 +1170,11 @@ static Bigint *
multadd(Bigint *b, int m, int a) /* multiply by m and add a */
{
int i, wds;
-#ifdef ULLong
ULong *x;
+#ifdef ULLong
ULLong carry, y;
#else
- ULong carry, *x, y;
+ ULong carry, y;
#ifdef Pack_32
ULong xi, z;
#endif
@@ -1189,7 +1189,7 @@ multadd(Bigint *b, int m, int a) /* multiply by m and add a */
#ifdef ULLong
y = *x * (ULLong)m + carry;
carry = y >> 32;
- *x++ = y & FFFFFFFF;
+ *x++ = (ULong)y & FFFFFFFF;
#else
#ifdef Pack_32
xi = *x;
@@ -1211,7 +1211,7 @@ multadd(Bigint *b, int m, int a) /* multiply by m and add a */
Bfree(b);
b = b1;
}
- b->x[wds++] = carry;
+ b->x[wds++] = (ULong)carry;
b->wds = wds;
}
return b;
@@ -1378,9 +1378,9 @@ mult(Bigint *a, Bigint *b)
do {
z = *x++ * (ULLong)y + *xc + carry;
carry = z >> 32;
- *xc++ = z & FFFFFFFF;
+ *xc++ = (ULong)z & FFFFFFFF;
} while (x < xae);
- *xc = carry;
+ *xc = (ULong)carry;
}
}
#else
@@ -1397,7 +1397,7 @@ mult(Bigint *a, Bigint *b)
carry = z2 >> 16;
Storeinc(xc, z2, z);
} while (x < xae);
- *xc = carry;
+ *xc = (ULong)carry;
}
if (y = *xb >> 16) {
x = xa;
@@ -1425,7 +1425,7 @@ mult(Bigint *a, Bigint *b)
carry = z >> 16;
*xc++ = z & 0xffff;
} while (x < xae);
- *xc = carry;
+ *xc = (ULong)carry;
}
}
#endif
@@ -1616,12 +1616,12 @@ diff(Bigint *a, Bigint *b)
do {
y = (ULLong)*xa++ - *xb++ - borrow;
borrow = y >> 32 & (ULong)1;
- *xc++ = y & FFFFFFFF;
+ *xc++ = (ULong)y & FFFFFFFF;
} while (xb < xbe);
while (xa < xae) {
y = *xa++ - borrow;
borrow = y >> 32 & (ULong)1;
- *xc++ = y & FFFFFFFF;
+ *xc++ = (ULong)y & FFFFFFFF;
}
#else
#ifdef Pack_32
@@ -2979,7 +2979,7 @@ quorem(Bigint *b, Bigint *S)
carry = ys >> 32;
y = *bx - (ys & FFFFFFFF) - borrow;
borrow = y >> 32 & (ULong)1;
- *bx++ = y & FFFFFFFF;
+ *bx++ = (ULong)y & FFFFFFFF;
#else
#ifdef Pack_32
si = *sx++;
@@ -3019,7 +3019,7 @@ quorem(Bigint *b, Bigint *S)
carry = ys >> 32;
y = *bx - (ys & FFFFFFFF) - borrow;
borrow = y >> 32 & (ULong)1;
- *bx++ = y & FFFFFFFF;
+ *bx++ = (ULong)y & FFFFFFFF;
#else
#ifdef Pack_32
si = *sx++;