This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Remove unnecessary variable
authorKarl Williamson <public@khwilliamson.com>
Thu, 2 Aug 2012 00:28:59 +0000 (18:28 -0600)
committerKarl Williamson <public@khwilliamson.com>
Thu, 2 Aug 2012 15:28:40 +0000 (09:28 -0600)
This variable was used because another was declared 'register'.  But
that declaration was removed by commit
e1d1eefb8c88e0dcaf2bb9e6c04d7f6192be966f in 2007, making the temporary
variable redundant.

regcomp.c

index eef0869..09a8f27 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -11319,7 +11319,7 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, U32 depth)
     register UV nextvalue;
     register UV prevvalue = OOB_UNICODE;
     register IV range = 0;
-    UV value = 0; /* XXX:dmq: needs to be referenceable (unfortunately) */
+    UV value = 0;
     register regnode *ret;
     STRLEN numlen;
     IV namedclass = OOB_NAMEDCLASS;
@@ -11484,13 +11484,11 @@ parseit:
                     if this makes sense as it does change the behaviour
                     from earlier versions, OTOH that behaviour was broken
                     as well. */
-                    UV v; /* value is register so we cant & it /grrr */
-                    if (! grok_bslash_N(pRExC_state, NULL, &v, NULL, depth,
+                    if (! grok_bslash_N(pRExC_state, NULL, &value, NULL, depth,
                                       TRUE /* => charclass */))
                     {
                         goto parseit;
                     }
-                    value= v; 
                 }
                 break;
            case 'p':