summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-02-19 12:14:06 -0700
committerKarl Williamson <khw@cpan.org>2018-02-19 20:47:10 -0700
commit3eb4defc9453e752f5aacd8d4934a502cc2d2138 (patch)
treefd9618938c7087122cdbeb4beff83d92ba5d6885
parent70bd58e99cf8c4f66531ed2261be494f9fe83a00 (diff)
downloadperl-3eb4defc9453e752f5aacd8d4934a502cc2d2138.tar.gz
regcomp.c: Silence uninit compiler warning
This warning (only known on one compiler at the moment) is probably wrong, but by setting this to NULL, we avoid the warning, and should segfault if the warning were correct, instead of using uninitialized data.
-rw-r--r--regcomp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/regcomp.c b/regcomp.c
index a3fadf6779..8f55141259 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -10689,7 +10689,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth)
* RExC_parse beyond the '('. Things like '(?' are indivisible tokens, and
* this flag alerts us to the need to check for that */
{
- regnode *ret; /* Will be the head of the group. */
+ regnode *ret = NULL; /* Will be the head of the group. */
regnode *br;
regnode *lastbr;
regnode *ender = NULL;