In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/801fcc250783bc56ec8033a5940b3257bcd9a7db?hp=1f9a1c0bdb88fe8f4b38dadcebb4988215612692>

- Log -----------------------------------------------------------------
commit 801fcc250783bc56ec8033a5940b3257bcd9a7db
Author: Dan Collins <[email protected]>
Date:   Sun Sep 13 09:24:14 2015 -0600

    PATCH [perl #126039] regexec.c: Fix compiler warning

M       regexec.c

commit 9ca36e518967de348b58bad346be981bbf2ae531
Author: Karl Williamson <[email protected]>
Date:   Sun Sep 13 09:30:38 2015 -0600

    Add Dan Collins to AUTHORS

M       AUTHORS
-----------------------------------------------------------------------

Summary of changes:
 AUTHORS   |  1 +
 regexec.c | 23 ++++++++++++-----------
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index b5ef912..304bd5d 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -270,6 +270,7 @@ Damian Conway                       <[email protected]>
 Damon Atkins                   <[email protected]>
 Dan Boorstein                  <[email protected]>
 Dan Brook                      <[email protected]>
+Dan Collins                    <[email protected]>
 Dan Dascalescu                 <[email protected]>
 Dan Hale                       <[email protected]>
 Dan Jacobson                   <[email protected]>
diff --git a/regexec.c b/regexec.c
index c88f467..90d1ecc 100644
--- a/regexec.c
+++ b/regexec.c
@@ -4813,7 +4813,8 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, 
regnode *prog)
     regnode *scan;
     regnode *next;
     U32 n = 0; /* general value; init to avoid compiler warning */
-    SSize_t ln = 0; /* len or last;  init to avoid compiler warning */
+    U32 prevn = 0; /* previous character;  init to avoid compiler warning */
+    SSize_t ln = 0; /* len;  init to avoid compiler warning */
     char *locinput = startpos;
     char *pushinput; /* where to continue after a PUSH */
     I32 nextchr;   /* is always set to UCHARAT(locinput) */
@@ -5538,9 +5539,9 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, 
regnode *prog)
 
            if (utf8_target) {
                if (locinput == reginfo->strbeg)
-                   ln = isWORDCHAR_LC('\n');
+                   prevn = isWORDCHAR_LC('\n');
                else {
-                    ln = isWORDCHAR_LC_utf8(reghop3((U8*)locinput, -1,
+                    prevn = isWORDCHAR_LC_utf8(reghop3((U8*)locinput, -1,
                                                         
(U8*)(reginfo->strbeg)));
                }
                 n = (NEXTCHR_IS_EOS)
@@ -5548,14 +5549,14 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char 
*startpos, regnode *prog)
                     : isWORDCHAR_LC_utf8((U8*)locinput);
            }
            else { /* Here the string isn't utf8 */
-               ln = (locinput == reginfo->strbeg)
+               prevn = (locinput == reginfo->strbeg)
                      ? isWORDCHAR_LC('\n')
                      : isWORDCHAR_LC(UCHARAT(locinput - 1));
                 n = (NEXTCHR_IS_EOS)
                     ? isWORDCHAR_LC('\n')
                     : isWORDCHAR_LC(nextchr);
            }
-            if (to_complement ^ (ln == n)) {
+            if (to_complement ^ (prevn == n)) {
                 sayNO;
             }
            break;
@@ -5586,13 +5587,13 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char 
*startpos, regnode *prog)
              * 2) it is a multi-byte character, in which case the final byte is
              *    never mistakable for ASCII, and so the test will say it is
              *    not a word character, which is the correct answer. */
-            ln = (locinput == reginfo->strbeg)
+            prevn = (locinput == reginfo->strbeg)
                  ? isWORDCHAR_A('\n')
                  : isWORDCHAR_A(UCHARAT(locinput - 1));
             n = (NEXTCHR_IS_EOS)
                 ? isWORDCHAR_A('\n')
                 : isWORDCHAR_A(nextchr);
-            if (to_complement ^ (ln == n)) {
+            if (to_complement ^ (prevn == n)) {
                 sayNO;
             }
            break;
@@ -5609,14 +5610,14 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char 
*startpos, regnode *prog)
               bound_utf8:
                 switch((bound_type) FLAGS(scan)) {
                     case TRADITIONAL_BOUND:
-                        ln = (locinput == reginfo->strbeg)
+                        prevn = (locinput == reginfo->strbeg)
                              ? 0 /* isWORDCHAR_L1('\n') */
                              : isWORDCHAR_utf8(reghop3((U8*)locinput, -1,
                                                                 
(U8*)(reginfo->strbeg)));
                         n = (NEXTCHR_IS_EOS)
                             ? 0 /* isWORDCHAR_L1('\n') */
                             : isWORDCHAR_utf8((U8*)locinput);
-                        match = cBOOL(ln != n);
+                        match = cBOOL(prevn != n);
                         break;
                     case GCB_BOUND:
                         if (locinput == reginfo->strbeg || NEXTCHR_IS_EOS) {
@@ -5679,13 +5680,13 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char 
*startpos, regnode *prog)
            else {  /* Not utf8 target */
                 switch((bound_type) FLAGS(scan)) {
                     case TRADITIONAL_BOUND:
-                        ln = (locinput == reginfo->strbeg)
+                        prevn = (locinput == reginfo->strbeg)
                             ? 0 /* isWORDCHAR_L1('\n') */
                             : isWORDCHAR_L1(UCHARAT(locinput - 1));
                         n = (NEXTCHR_IS_EOS)
                             ? 0 /* isWORDCHAR_L1('\n') */
                             : isWORDCHAR_L1(nextchr);
-                        match = cBOOL(ln != n);
+                        match = cBOOL(prevn != n);
                         break;
 
                     case GCB_BOUND:

--
Perl5 Master Repository

Reply via email to