Prevent a compiler warning: ‘zi’ may be used uninitialized

This commit is contained in:
Yusuke Endoh 2023-11-22 13:07:44 +09:00
parent 8e80cad9e9
commit 31517c8627

View File

@ -1045,7 +1045,7 @@ complex_pow_for_special_angle(VALUE self, VALUE other)
};
int z_dir = FIX2INT(rb_int_modulo(rb_int_mul(INT2FIX(dir), other), INT2FIX(8)));
VALUE zr, zi;
VALUE zr = Qfalse, zi = Qfalse;
switch (dirs[z_dir][0]) {
case 0: zr = zero_for(zx); break;
case 1: zr = zx; break;