summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorAndy Lester <andy@petdance.com>2005-10-13 11:42:12 -0500
committerSteve Peters <steve@fisharerojo.org>2005-10-13 23:03:46 +0000
commit551405c409d33bc8cd0a20177c4ee21a204d18b5 (patch)
tree42d3d3344712d171624bc4d793b87f019234bba4 /toke.c
parentb1681ed3d2d7fce28f676043b07816f4fad94f55 (diff)
downloadperl-551405c409d33bc8cd0a20177c4ee21a204d18b5.tar.gz
Stas' croak patch and then some
Message-ID: <20051013214212.GA1122@petdance.com> p4raw-id: //depot/perl@25754
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/toke.c b/toke.c
index 717bfdcfc9..cf81ce855b 100644
--- a/toke.c
+++ b/toke.c
@@ -408,12 +408,12 @@ S_no_op(pTHX_ const char *what, char *s)
if (t < PL_bufptr && isSPACE(*t))
Perl_warner(aTHX_ packWARN(WARN_SYNTAX),
"\t(Do you need to predeclare %.*s?)\n",
- t - PL_oldoldbufptr, PL_oldoldbufptr);
+ (int)(t - PL_oldoldbufptr), PL_oldoldbufptr);
}
else {
assert(s >= oldbp);
Perl_warner(aTHX_ packWARN(WARN_SYNTAX),
- "\t(Missing operator before %.*s?)\n", s - oldbp, oldbp);
+ "\t(Missing operator before %.*s?)\n", (int)(s - oldbp), oldbp);
}
}
PL_bufptr = oldbp;
@@ -2852,7 +2852,7 @@ Perl_yylex(pTHX)
* at least, set argv[0] to the basename of the Perl
* interpreter. So, having found "#!", we'll set it right.
*/
- SV *x = GvSV(gv_fetchpv("\030", TRUE, SVt_PV)); /* $^X */
+ SV * const x = GvSV(gv_fetchpv("\030", TRUE, SVt_PV)); /* $^X */
assert(SvPOK(x) || SvGMAGICAL(x));
if (sv_eq(x, CopFILESV(PL_curcop))) {
sv_setpvn(x, ipath, ipathend - ipath);
@@ -4964,9 +4964,10 @@ Perl_yylex(pTHX)
/* [perl #16184] */
&& !(t[0] == '=' && t[1] == '>')
) {
+ int len = (int)(d-s);
Perl_warner(aTHX_ packWARN(WARN_PRECEDENCE),
"Precedence problem: open %.*s should be open(%.*s)",
- d - s, s, d - s, s);
+ len, s, len, s);
}
}
LOP(OP_OPEN,XTERM);