Silence compiler warnings
authorRobin Barker <rmbarker@cpan.org>
Thu, 9 Feb 2012 06:42:15 +0000 (07:42 +0100)
committerSteffen Mueller <smueller@cpan.org>
Thu, 9 Feb 2012 06:42:15 +0000 (07:42 +0100)
Cf. RT #110208.
- Remove missing unused variables: op.c, regcomp.c
- Silence -Wformat type error: sv.c
- Cast first part of (,) expression as (void): gv.c

gv.c
op.c
regcomp.c
sv.c

diff --git a/gv.c b/gv.c
index dca0fa2..a61c34f 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -318,7 +318,7 @@ Perl_gv_init_pvn(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len, U32 flag
     const U32 old_type = SvTYPE(gv);
     const bool doproto = old_type > SVt_NULL;
     char * const proto = (doproto && SvPOK(gv))
-       ? (SvIsCOW(gv) && (sv_force_normal((SV *)gv), 0), SvPVX(gv))
+       ? ((void)(SvIsCOW(gv) && (sv_force_normal((SV *)gv), 0)), SvPVX(gv))
        : NULL;
     const STRLEN protolen = proto ? SvCUR(gv) : 0;
     const U32 proto_utf8  = proto ? SvUTF8(gv) : 0;
diff --git a/op.c b/op.c
index a9296f3..25a5353 100644 (file)
--- a/op.c
+++ b/op.c
@@ -1776,7 +1776,6 @@ Perl_op_lvalue_flags(pTHX_ OP *o, I32 type, U32 flags)
            else {                      /* Compile-time error message: */
                OP *kid = cUNOPo->op_first;
                CV *cv;
-               OP *okid;
 
                if (kid->op_type != OP_PUSHMARK) {
                    if (kid->op_type != OP_NULL || kid->op_targ != OP_LIST)
@@ -1792,7 +1791,6 @@ Perl_op_lvalue_flags(pTHX_ OP *o, I32 type, U32 flags)
                    break;      /* Postpone until runtime */
                }
 
-               okid = kid;
                kid = kUNOP->op_first;
                if (kid->op_type == OP_NULL && kid->op_targ == OP_RV2SV)
                    kid = kUNOP->op_first;
index 668f8f7..60c37cf 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -9271,7 +9271,6 @@ tryagain:
            char *s;
            STRLEN foldlen;
            U8 tmpbuf[UTF8_MAXBYTES_CASE+1], *foldbuf;
-           regnode * orig_emit;
             U8 node_type;
 
            /* Is this a LATIN LOWER CASE SHARP S in an EXACTFU node?  If so,
@@ -9279,9 +9278,6 @@ tryagain:
            bool is_exactfu_sharp_s;
 
            ender = 0;
-           orig_emit = RExC_emit; /* Save the original output node position in
-                                     case we need to output a different node
-                                     type */
             node_type = ((! FOLD) ? EXACT
                        : (LOC)
                          ? EXACTFL
diff --git a/sv.c b/sv.c
index ace74bc..47e71ec 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -5587,7 +5587,7 @@ Perl_sv_del_backref(pTHX_ SV *const tsv, SV *const sv)
        if (PL_phase == PERL_PHASE_DESTRUCT && SvREFCNT(tsv) == 0)
            return;
        Perl_croak(aTHX_ "panic: del_backref, *svp=%p phase=%s refcnt=%" UVuf,
-                  *svp, PL_phase_names[PL_phase], SvREFCNT(tsv));
+                  *svp, PL_phase_names[PL_phase], (UV)SvREFCNT(tsv));
     }
 
     if (SvTYPE(*svp) == SVt_PVAV) {