diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2014-09-01 20:06:39 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2014-09-01 20:15:06 -0400 |
commit | f256868e821a3fbdb18816d1f5f9f1e3588f77c7 (patch) | |
tree | fc2cb20e52d0dfc8f329ee754b114e95abff2c27 /pp.c | |
parent | 808724c8e7a94623556f18e681fba068b52291a5 (diff) | |
download | perl-f256868e821a3fbdb18816d1f5f9f1e3588f77c7.tar.gz |
Make certain pp_sin result is always initialized.
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2703,7 +2703,7 @@ PP(pp_sin) { SV * const arg = POPs; const NV value = SvNV_nomg(arg); - NV result; + NV result = NV_NAN; if (neg_report) { /* log or sqrt */ if (op_type == OP_LOG ? (value <= 0.0) : (value < 0.0)) { SET_NUMERIC_STANDARD(); @@ -2712,6 +2712,7 @@ PP(pp_sin) } } switch (op_type) { + default: case OP_SIN: result = Perl_sin(value); break; case OP_COS: result = Perl_cos(value); break; case OP_EXP: result = Perl_exp(value); break; |