aboutsummaryrefslogtreecommitdiffstats
path: root/rational.c
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-11 14:39:34 +0000
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-11 14:39:34 +0000
commit7f4e459a6623791ccec7c18bb17b3e549769dda7 (patch)
treea03c0268733be413e99fae0819bd44c2fca5e07c /rational.c
parent7ffdc23ca144cf249a8ecbce7e26af381e443e37 (diff)
downloadruby-7f4e459a6623791ccec7c18bb17b3e549769dda7.tar.gz
rational.c: prevent unused warning
* rational.c (f_mod): define only when NDEBUG is not defined to prevent unused warning git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rational.c')
-rw-r--r--rational.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/rational.c b/rational.c
index e4f59895bf..0044024cbf 100644
--- a/rational.c
+++ b/rational.c
@@ -101,7 +101,10 @@ f_lt_p(VALUE x, VALUE y)
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)