summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2014-09-01 20:06:39 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2014-09-01 20:15:06 -0400
commitf256868e821a3fbdb18816d1f5f9f1e3588f77c7 (patch)
treefc2cb20e52d0dfc8f329ee754b114e95abff2c27 /pp.c
parent808724c8e7a94623556f18e681fba068b52291a5 (diff)
downloadperl-f256868e821a3fbdb18816d1f5f9f1e3588f77c7.tar.gz
Make certain pp_sin result is always initialized.
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pp.c b/pp.c
index 723986cf75..b098ede218 100644
--- a/pp.c
+++ b/pp.c
@@ -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;