This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
clean up compilation warnings
authorJesse Luehrs <doy@tozt.net>
Wed, 27 Jun 2012 18:40:49 +0000 (13:40 -0500)
committerJesse Luehrs <doy@tozt.net>
Wed, 27 Jun 2012 18:40:49 +0000 (13:40 -0500)
dquote_static.c
mg.c
pp.c
regexec.c
toke.c

index 4ab05cf..f7c3e5c 100644 (file)
@@ -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 14965da..c60c277 100644 (file)
--- 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 2ecdb87..c7d1841 100644 (file)
--- 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;
index 0bb8d7e..c3a752c 100644 (file)
--- a/regexec.c
+++ b/regexec.c
 #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 df73b88..13d7ac2 100644 (file)
--- 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