This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In S_regatom, declare parse_start when RE_TRACK_PATTERN_OFFSETS is defined.
authorNicholas Clark <nick@ccl4.org>
Tue, 4 Jun 2013 15:37:10 +0000 (17:37 +0200)
committerNicholas Clark <nick@ccl4.org>
Thu, 6 Jun 2013 07:39:30 +0000 (09:39 +0200)
Commit 779fedd7c3021f01 (March 2013) moved code which unconditionally used
parse_start into another block. Hence the variable is now only needed when
RE_TRACK_PATTERN_OFFSETS is defined, so wrap its declaration in #ifdef/#endif
to avoid C compiler warnings.

regcomp.c

index d1ffe5d..642f62a 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -10694,7 +10694,9 @@ tryagain:
                     /* Probably a character specified in octal, e.g. \35 */
                    goto defchar;
                else {
+#ifdef RE_TRACK_PATTERN_OFFSETS
                    char * const parse_start = RExC_parse - 1; /* MJD */
+#endif
                    while (isDIGIT(*RExC_parse))
                        RExC_parse++;
                     if (hasbrace) {