This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Quiet false warning
authorKarl Williamson <khw@cpan.org>
Sat, 10 Mar 2018 04:31:16 +0000 (21:31 -0700)
committerKarl Williamson <khw@cpan.org>
Sat, 10 Mar 2018 04:46:21 +0000 (21:46 -0700)
One compiler is complaining that this variable may be used
uninitialized.  It's not true, but set it to NULL anyway.

regcomp.c

index 92c8fe4..4594bca 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -12309,7 +12309,7 @@ S_grok_bslash_N(pTHX_ RExC_state_t *pRExC_state,
     char * endbrace;    /* points to '}' following the name */
     char* p = RExC_parse; /* Temporary */
 
-    SV * substitute_parse;
+    SV * substitute_parse = NULL;
     char *orig_end;
     char *save_start;
     I32 flags;