diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-23 19:50:47 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-23 19:50:47 +0000 |
commit | 20219afd83a34cf4f09424f5d18d39db2b6dedba (patch) | |
tree | 1047dec71a28d1c0cfad0fc7ef31e8285409f581 /ext | |
parent | 71012b3aa7906ec00eab1e815c059199234b134b (diff) | |
download | ruby-20219afd83a34cf4f09424f5d18d39db2b6dedba.tar.gz |
Suppress warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/bigdecimal/bigdecimal.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index 02d2da8de2..9e2aa31d37 100644 --- a/ext/bigdecimal/bigdecimal.c +++ b/ext/bigdecimal/bigdecimal.c @@ -3525,8 +3525,6 @@ VpIsNegDoubleZero(double v) VP_EXPORT int VpException(unsigned short f, const char *str,int always) { - VALUE exc; - int fatal=0; unsigned short const exception_mode = VpGetException(); if (f == VP_EXCEPTION_OP || f == VP_EXCEPTION_MEMORY) always = 1; @@ -3539,22 +3537,14 @@ VpException(unsigned short f, const char *str,int always) case VP_EXCEPTION_NaN: case VP_EXCEPTION_UNDERFLOW: case VP_EXCEPTION_OP: - exc = rb_eFloatDomainError; - goto raise; + rb_raise(rb_eFloatDomainError, "%s", str); + break; case VP_EXCEPTION_MEMORY: - fatal = 1; - goto raise; default: - fatal = 1; - goto raise; + rb_fatal("%s", str); } } return 0; /* 0 Means VpException() raised no exception */ - -raise: - if (fatal) rb_fatal("%s", str); - else rb_raise(exc, "%s", str); - return 0; } /* Throw exception or returns 0,when resulting c is Inf or NaN */ @@ -4497,7 +4487,7 @@ VpMult(Real *c, Real *a, Real *b) ind_ae = MxIndA - (nc - MxIndB); ind_bs = MxIndB; } - else if (nc > MxIndA) { /* The right triangle of the Fig. */ + else /* if (nc > MxIndA) */ { /* The right triangle of the Fig. */ ind_as = 0; ind_ae = MxIndAB - nc - 1; ind_bs = MxIndB - (nc - MxIndA); |