aboutsummaryrefslogtreecommitdiffstats
path: root/numeric.c
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-05 15:02:17 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-05 15:02:17 +0000
commit6a8d553ca63eb12084c84cdc29ede534e2cc3828 (patch)
treebf9eef5b877295dfea275519208cc520c467f6f6 /numeric.c
parentde508619d94041cf0d0c630624fdbd3cc5c4c18b (diff)
downloadruby-6a8d553ca63eb12084c84cdc29ede534e2cc3828.tar.gz
* numeric.c (rb_int_round): cast to SIGNED_VALUE to suppress
warnings by -Wsign-compare. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/numeric.c b/numeric.c
index 4881f75217..e7a98566c0 100644
--- a/numeric.c
+++ b/numeric.c
@@ -2075,7 +2075,7 @@ rb_int_round(VALUE num, int ndigits, enum ruby_num_rounding_mode mode)
(FIXNUM_ZERO_P(r) &&
ROUND_TO(mode,
int_pos_p(num),
- int_odd_p(rb_int_idiv(n, f))))) {
+ (SIGNED_VALUE) int_odd_p(rb_int_idiv(n, f))))) {
n = rb_int_plus(n, f);
}
return n;