From: Andy Lester Date: Fri, 10 Mar 2006 16:31:00 +0000 (-0600) Subject: Localizing some vars in S_checkcomma X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=26ff08064ccac2e27a67c591a44b240da64e2844;p=p5sagit%2Fp5-mst-13.2.git Localizing some vars in S_checkcomma Message-ID: <20060310223100.GA13455@petdance.com> Date: Fri, 10 Mar 2006 16:31:00 -0600 p4raw-id: //depot/perl@27469 --- diff --git a/toke.c b/toke.c index 3a3afe5..f16964e 100644 --- a/toke.c +++ b/toke.c @@ -10156,19 +10156,19 @@ STATIC void S_checkcomma(pTHX_ const char *s, const char *name, const char *what) { dVAR; - const char *w; if (*s == ' ' && s[1] == '(') { /* XXX gotta be a better way */ if (ckWARN(WARN_SYNTAX)) { int level = 1; + const char *w; for (w = s+2; *w && level; w++) { if (*w == '(') ++level; else if (*w == ')') --level; } - if (*w) - for (; *w && isSPACE(*w); w++) ; + for (; *w && isSPACE(*w); w++) + /* EMPTY */; if (!*w || !strchr(";|})]oaiuw!=", *w)) /* an advisory hack only... */ Perl_warner(aTHX_ packWARN(WARN_SYNTAX), "%s (...) interpreted as function",name); @@ -10181,7 +10181,7 @@ S_checkcomma(pTHX_ const char *s, const char *name, const char *what) while (s < PL_bufend && isSPACE(*s)) s++; if (isIDFIRST_lazy_if(s,UTF)) { - w = s++; + const char * const w = s++; while (isALNUM_lazy_if(s,UTF)) s++; while (s < PL_bufend && isSPACE(*s))