Skip to content

Commit

Permalink
suppress warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Watson1978 committed Jan 18, 2012
1 parent a7431e5 commit f152f43
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions util.c
Expand Up @@ -162,7 +162,7 @@ ruby_strtoul(const char *str, char **endptr, int base)
}

if (sign < 0) {
ret = -ret;
ret = (unsigned long)(-(long)ret);
return ret;
}
else {
Expand Down Expand Up @@ -2961,7 +2961,7 @@ ruby_strtod(const char *s00, char **se)
#ifdef Avoid_Underflow
if (scale && y <= 2*P*Exp_msk1) {
if (aadj <= 0x7fffffff) {
if ((z = aadj) <= 0)
if ((z = (int)aadj) <= 0)
z = 1;
aadj = z;
aadj1 = dsign ? aadj : -aadj;
Expand Down Expand Up @@ -3565,7 +3565,7 @@ dtoa(double d, int mode, int ndigits, int *decpt, int *sign, char **rve)
*/
dval(eps) = 0.5/tens[ilim-1] - dval(eps);
for (i = 0;;) {
L = dval(d);
L = (int)dval(d);
dval(d) -= L;
*s++ = '0' + (int)L;
if (dval(d) < dval(eps))
Expand Down

0 comments on commit f152f43

Please sign in to comment.