mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
complex.c: suppress warnings on FreeBSD
* complex.c (safe_mul): get rid of assignments in a macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
34beb98464
commit
f8a82e1583
1 changed files with 2 additions and 2 deletions
|
@ -747,10 +747,10 @@ static VALUE
|
|||
safe_mul(VALUE a, VALUE b, int az, int bz)
|
||||
{
|
||||
double v;
|
||||
if (!az && bz && RB_FLOAT_TYPE_P(a) && !isnan(v = RFLOAT_VALUE(a))) {
|
||||
if (!az && bz && RB_FLOAT_TYPE_P(a) && (v = RFLOAT_VALUE(a), !isnan(v))) {
|
||||
a = signbit(v) ? DBL2NUM(-1.0) : DBL2NUM(1.0);
|
||||
}
|
||||
if (!bz && az && RB_FLOAT_TYPE_P(b) && !isnan(v = RFLOAT_VALUE(b))) {
|
||||
if (!bz && az && RB_FLOAT_TYPE_P(b) && (v = RFLOAT_VALUE(b), !isnan(v))) {
|
||||
b = signbit(v) ? DBL2NUM(-1.0) : DBL2NUM(1.0);
|
||||
}
|
||||
return f_mul(a, b);
|
||||
|
|
Loading…
Reference in a new issue