summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-03-04 11:28:13 -0700
committerKarl Williamson <khw@cpan.org>2019-03-04 11:38:09 -0700
commita79c258cf539dc7cba437fc32a30cea417a228fe (patch)
treeb06677dbb70e8eecbb0f76959f9d32fb22e1f7fd
parent3a732259e3184810c5c5422afdec6fae9ef54977 (diff)
downloadperl-a79c258cf539dc7cba437fc32a30cea417a228fe.tar.gz
regcomp.c: Silence compiler warning msg.
Some compilers aren't smart enough to realize there is no path through this function that doesn't set the return value. So initialize to an illegal value. Spotted by atoomic
-rw-r--r--regcomp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/regcomp.c b/regcomp.c
index 5bae668075..5cb8c6a56c 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -16478,7 +16478,7 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
UV prevvalue = OOB_UNICODE, save_prevvalue = OOB_UNICODE;
IV range = 0;
UV value = OOB_UNICODE, save_value = OOB_UNICODE;
- regnode_offset ret;
+ regnode_offset ret = -1; /* Initialized to an illegal value */
STRLEN numlen;
int namedclass = OOB_NAMEDCLASS;
char *rangebegin = NULL;