summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2012-06-27 13:40:49 -0500
committerJesse Luehrs <doy@tozt.net>2012-06-27 13:40:49 -0500
commit4f8dbb2da2038925c8238010259dcd81d79d7368 (patch)
tree883c6ed307da401097928c032474c3fbcfa48f42
parentf7f0fdee1d58ef2156184ae0b7356ecd6c0c37a0 (diff)
downloadperl-4f8dbb2da2038925c8238010259dcd81d79d7368.tar.gz
clean up compilation warnings
-rw-r--r--dquote_static.c1
-rw-r--r--mg.c1
-rw-r--r--pp.c3
-rw-r--r--regexec.c8
-rw-r--r--toke.c2
5 files changed, 9 insertions, 6 deletions
diff --git a/dquote_static.c b/dquote_static.c
index 4ab05cf573..f7c3e5cc70 100644
--- a/dquote_static.c
+++ b/dquote_static.c
@@ -196,6 +196,7 @@ S_grok_bslash_x(pTHX_ const char *s,
PERL_ARGS_ASSERT_GROK_BSLASH_X;
+ PERL_UNUSED_ARG(output_warning);
assert(*s == 'x');
s++;
diff --git a/mg.c b/mg.c
index 14965da0a8..c60c277ae6 100644
--- a/mg.c
+++ b/mg.c
@@ -3412,6 +3412,7 @@ Perl_magic_copycallchecker(pTHX_ SV *sv, MAGIC *mg, SV *nsv,
MAGIC *nmg;
PERL_ARGS_ASSERT_MAGIC_COPYCALLCHECKER;
+ PERL_UNUSED_ARG(sv);
PERL_UNUSED_ARG(name);
PERL_UNUSED_ARG(namlen);
diff --git a/pp.c b/pp.c
index 2ecdb870aa..c7d1841d61 100644
--- a/pp.c
+++ b/pp.c
@@ -650,10 +650,9 @@ PP(pp_gelem)
PP(pp_study)
{
dVAR; dSP; dPOPss;
- register unsigned char *s;
STRLEN len;
- s = (unsigned char*)(SvPV(sv, len));
+ len = SvCUR(sv);
if (len == 0 || len > I32_MAX || !SvPOK(sv) || SvUTF8(sv) || SvVALID(sv)) {
/* Historically, study was skipped in these cases. */
RETPUSHNO;
diff --git a/regexec.c b/regexec.c
index 0bb8d7ed98..c3a752c41c 100644
--- a/regexec.c
+++ b/regexec.c
@@ -126,10 +126,9 @@
#else
# define LOAD_UTF8_CHARCLASS(class,str) STMT_START { \
if (!CAT2(PL_utf8_,class)) { \
- bool ok; \
ENTER; save_re_context(); \
- ok=CAT2(is_utf8_,class)((const U8*)str); \
- assert(ok); assert(CAT2(PL_utf8_,class)); LEAVE; } } STMT_END
+ assert(CAT2(is_utf8_,class)((const U8*)str)); \
+ assert(CAT2(PL_utf8_,class)); LEAVE; } } STMT_END
#endif
/* Doesn't do an assert to verify that is correct */
@@ -3167,6 +3166,8 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog)
multicall_oldcatch = 0;
multicall_cv = NULL;
cx = NULL;
+ PERL_UNUSED_VAR(multicall_cop);
+ PERL_UNUSED_VAR(newsp);
PERL_ARGS_ASSERT_REGMATCH;
@@ -6038,6 +6039,7 @@ no_silent:
if (last_pushed_cv) {
dSP;
POP_MULTICALL;
+ PERL_UNUSED_VAR(SP);
}
/* clean up; in particular, free all slabs above current one */
diff --git a/toke.c b/toke.c
index df73b8864a..13d7ac2cd0 100644
--- a/toke.c
+++ b/toke.c
@@ -9060,7 +9060,7 @@ S_pmflag(pTHX_ const char* const valid_flags, U32 * pmfl, char** s, char* charse
if ( charlen != 1 || ! strchr(valid_flags, c) ) {
if (isALNUM_lazy_if(*s, UTF)) {
- yyerror_pv(Perl_form(aTHX_ "Unknown regexp modifier \"/%.*s\"", charlen, *s),
+ yyerror_pv(Perl_form(aTHX_ "Unknown regexp modifier \"/%.*s\"", (int)charlen, *s),
UTF ? SVf_UTF8 : 0);
(*s) += charlen;
/* Pretend that it worked, so will continue processing before