ruby-changes:44636
From: mrkn <ko1@a...>
Date: Fri, 11 Nov 2016 23:57:03 +0900 (JST)
Subject: [ruby-changes:44636] mrkn:r56708 (trunk): rational.c: prevent unused warning
mrkn 2016-11-11 23:39:34 +0900 (Fri, 11 Nov 2016) New Revision: 56708 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56708 Log: rational.c: prevent unused warning * rational.c (f_mod): define only when NDEBUG is not defined to prevent unused warning Modified files: trunk/rational.c Index: rational.c =================================================================== --- rational.c (revision 56707) +++ rational.c (revision 56708) @@ -101,7 +101,10 @@ f_lt_p(VALUE x, VALUE y) https://github.com/ruby/ruby/blob/trunk/rational.c#L101 return RTEST(rb_funcall(x, '<', 1, y)); } +#ifndef NDEBUG +/* f_mod is used only in f_gcd defined when NDEBUG is not defined */ binop(mod, '%') +#endif inline static VALUE f_mul(VALUE x, VALUE y) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/