diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-08 06:29:13 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-08 06:29:13 +0000 |
commit | 859314cbc63f5473bf7dd34e1147ae4b6da0726a (patch) | |
tree | be522f0c0f406c88be1ee29c3ff76cd4394bdc27 | |
parent | 1a98b567af45a44c27b2aa776c71f580c2c6f887 (diff) | |
download | ruby-859314cbc63f5473bf7dd34e1147ae4b6da0726a.tar.gz |
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
-rw-r--r-- | ext/bigdecimal/bigdecimal.c | 4 |
1 files 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; |