This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Silence valgrind warning
authorKarl Williamson <public@khwilliamson.com>
Fri, 23 Dec 2011 00:58:20 +0000 (17:58 -0700)
committerDavid Mitchell <davem@iabyn.com>
Wed, 13 Jun 2012 12:32:48 +0000 (13:32 +0100)
This happens only in doing debug output.  Initialize these two debugging
variables

[ this commit was previously reverted to make rebasing easier; added back
now ]

regcomp.c

index ebff883..75ed11b 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -5511,7 +5511,11 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
        * Clever compilers notice this and complain. --jhi */
     REGC((U8)REG_MAGIC, (char*)RExC_emit);
 #endif
-    DEBUG_PARSE_r(PerlIO_printf(Perl_debug_log, "Starting first pass (sizing)\n"));
+    DEBUG_PARSE_r(
+       PerlIO_printf(Perl_debug_log, "Starting first pass (sizing)\n");
+        RExC_lastnum=0;
+        RExC_lastparse=NULL;
+    );
     if (reg(pRExC_state, 0, &flags,1) == NULL) {
        RExC_precomp = NULL;
        Safefree(pRExC_state->code_blocks);