From 20219afd83a34cf4f09424f5d18d39db2b6dedba Mon Sep 17 00:00:00 2001 From: naruse Date: Sat, 23 Mar 2013 19:50:47 +0000 Subject: Suppress warnings git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/bigdecimal/bigdecimal.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'ext/bigdecimal') 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); -- cgit v1.2.3