From 859314cbc63f5473bf7dd34e1147ae4b6da0726a Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 8 Nov 2015 06:29:13 +0000 Subject: [PATCH] bigdecimal.c: suppress warnings * ext/bigdecimal/bigdecimal.c (AddExponent): suppress strict-overflow warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/bigdecimal/bigdecimal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index 4d54642f48..21a117e8b5 100644 --- a/ext/bigdecimal/bigdecimal.c +++ b/ext/bigdecimal/bigdecimal.c @@ -3858,7 +3858,7 @@ AddExponent(Real *a, SIGNED_VALUE n) goto overflow; mb = m*(SIGNED_VALUE)BASE_FIG; eb = e*(SIGNED_VALUE)BASE_FIG; - if (mb < eb) goto overflow; + if (eb - mb > 0) goto overflow; } } else if (n < 0) { @@ -3867,7 +3867,7 @@ AddExponent(Real *a, SIGNED_VALUE n) goto underflow; mb = m*(SIGNED_VALUE)BASE_FIG; eb = e*(SIGNED_VALUE)BASE_FIG; - if (mb > eb) goto underflow; + if (mb - eb > 0) goto underflow; } a->exponent = m; return 1;