summaryrefslogtreecommitdiff
path: root/complex.c
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2023-11-22 13:07:44 +0900
committerYusuke Endoh <mame@ruby-lang.org>2023-11-22 13:07:44 +0900
commit31517c862760626c228b017a4a6e7c6003abeb84 (patch)
tree1070ed9571a22c70ec6377581fa7fc9cedd46395 /complex.c
parent8e80cad9e9f70948c1c2d472b66a94c4151268f4 (diff)
Prevent a compiler warning: ‘zi’ may be used uninitialized
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/complex.c b/complex.c
index f518834bfc..b9d9969932 100644
--- a/complex.c
+++ b/complex.c
@@ -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;