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

ruby-changes:30391

From: nobu <ko1@a...>
Date: Fri, 9 Aug 2013 22:41:29 +0900 (JST)
Subject: [ruby-changes:30391] nobu:r42470 (trunk): bignum.c: suppress warning

nobu	2013-08-09 22:41:23 +0900 (Fri, 09 Aug 2013)

  New Revision: 42470

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

  Log:
    bignum.c: suppress warning
    
    * bignum.c (rb_big_mul_karatsuba): suppress logical-op-parentheses
      warning.

  Modified files:
    trunk/bignum.c
Index: bignum.c
===================================================================
--- bignum.c	(revision 42469)
+++ bignum.c	(revision 42470)
@@ -2006,7 +2006,7 @@ rb_big_mul_karatsuba(VALUE x, VALUE y) https://github.com/ruby/ruby/blob/trunk/bignum.c#L2006
 {
     size_t xn = RBIGNUM_LEN(x), yn = RBIGNUM_LEN(y), zn = xn + yn;
     VALUE z = bignew(zn, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y));
-    if (!(xn <= yn && yn < 2 || KARATSUBA_BALANCED(xn, yn)))
+    if (!((xn <= yn && yn < 2) || KARATSUBA_BALANCED(xn, yn)))
         rb_raise(rb_eArgError, "unexpected bignum length for karatsuba");
     bary_mul_karatsuba(BDIGITS(z), zn, BDIGITS(x), xn, BDIGITS(y), yn, NULL, 0);
     RB_GC_GUARD(x);

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

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