[前][次][番号順一覧][スレッド一覧]

ruby-changes:15588

From: nobu <ko1@a...>
Date: Mon, 26 Apr 2010 10:09:35 +0900 (JST)
Subject: [ruby-changes:15588] Ruby:r27494 (trunk): * ext/bigdecimal/bigdecimal.c: suppressed warnings.

nobu	2010-04-26 10:07:32 +0900 (Mon, 26 Apr 2010)

  New Revision: 27494

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27494

  Log:
    * ext/bigdecimal/bigdecimal.c: suppressed warnings.

  Modified files:
    trunk/ext/bigdecimal/bigdecimal.c

Index: ext/bigdecimal/bigdecimal.c
===================================================================
--- ext/bigdecimal/bigdecimal.c	(revision 27493)
+++ ext/bigdecimal/bigdecimal.c	(revision 27494)
@@ -641,7 +641,7 @@
     if(VpIsNaN(b)) return b->obj;
     if(VpIsNaN(a)) return a->obj;
     mx = GetAddSubPrec(a,b);
-    if(mx==(-1L)) {
+    if(mx==(U_LONG)-1L) {
         GUARD_OBJ(c,VpCreateRbObject(VpBaseFig() + 1, "0"));
         VpAddSub(c, a, b, 1);
     } else {
@@ -682,7 +682,7 @@
     if(VpIsNaN(a)) return a->obj;
 
     mx = GetAddSubPrec(a,b);
-    if(mx==(-1L)) {
+    if(mx==(U_LONG)-1L) {
         GUARD_OBJ(c,VpCreateRbObject(VpBaseFig() + 1, "0"));
         VpAddSub(c, a, b, -1);
     } else {
@@ -2928,8 +2928,8 @@
     a_pos = ap;
     b_pos = bp;
     c_pos = cp;
-    if(word_shift==-1L) return 0; /* Overflow */
-    if(b_pos == -1L) goto Assign_a;
+    if(word_shift==(U_LONG)-1L) return 0; /* Overflow */
+    if(b_pos == (U_LONG)-1L) goto Assign_a;
 
     mrv = av + bv; /* Most right val. Used for round. */
 
@@ -3021,8 +3021,8 @@
     a_pos = ap;
     b_pos = bp;
     c_pos = cp;
-    if(word_shift==-1L) return 0; /* Overflow */
-    if(b_pos == -1L) goto Assign_a;
+    if(word_shift==(U_LONG)-1L) return 0; /* Overflow */
+    if(b_pos == (U_LONG)-1L) goto Assign_a;
 
     if(av >= bv) {
         mrv = av - bv;
@@ -3297,7 +3297,7 @@
             }
             if(Carry) {
                 ii = ind_c;
-                while((--ii) >= 0) {
+                while(ii-- > 0) {
                     c->frac[ii] += Carry;
                     if(c->frac[ii] >= BASE) {
                         Carry = c->frac[ii] / BASE;
@@ -4044,7 +4044,7 @@
     /* get integer part */
     i = 0;
     sign = 1;
-    if(ni >= 0) {
+    if(1 /*ni >= 0*/) {
         if(int_chr[0] == '-') {
             sign = -1;
             ++i;

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]