This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #76478] silence compiler warning
authorDavid Mitchell <davem@iabyn.com>
Fri, 23 Jul 2010 22:24:11 +0000 (23:24 +0100)
committerDavid Mitchell <davem@iabyn.com>
Fri, 23 Jul 2010 22:24:11 +0000 (23:24 +0100)
Intel's icc compiler is too clever for its own good.
Silence a false positive 'may be used undefined' warning.

op.c

diff --git a/op.c b/op.c
index 276e100..5a0962b 100644 (file)
--- a/op.c
+++ b/op.c
@@ -5661,7 +5661,7 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
     dVAR;
     GV *gv;
     const char *ps;
-    STRLEN ps_len;
+    STRLEN ps_len = 0; /* init it to avoid false uninit warning from icc */
     register CV *cv = NULL;
     SV *const_sv;
     /* If the subroutine has no body, no attributes, and no builtin attributes