Fix bug in DynaLoader, which has been passing a filename in dynamic
[p5sagit/p5-mst-13.2.git] / pp.c
diff --git a/pp.c b/pp.c
index 253126d..777c657 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -346,7 +346,7 @@ PP(pp_rv2cv)
 {
     dVAR; dSP;
     GV *gv;
-    HV *stash;
+    HV *stash_unused;
     const I32 flags = (PL_op->op_flags & OPf_SPECIAL)
        ? 0
        : ((PL_op->op_private & (OPpLVAL_INTRO|OPpMAY_RETURN_CONSTANT)) == OPpMAY_RETURN_CONSTANT)
@@ -355,7 +355,7 @@ PP(pp_rv2cv)
     /* We usually try to add a non-existent subroutine in case of AUTOLOAD. */
     /* (But not in defined().) */
 
-    CV *cv = sv_2cv(TOPs, &stash, &gv, flags);
+    CV *cv = sv_2cv(TOPs, &stash_unused, &gv, flags);
     if (cv) {
        if (CvCLONE(cv))
            cv = (CV*)sv_2mortal((SV*)cv_clone(cv));
@@ -3207,7 +3207,7 @@ PP(pp_index)
        if (little_utf8 && !PL_encoding) {
            /* Well, maybe instead we might be able to downgrade the small
               string?  */
-           char * const pv = (char*)bytes_from_utf8(little_p, &llen,
+           char * const pv = (char*)bytes_from_utf8((U8 *)little_p, &llen,
                                                     &little_utf8);
            if (little_utf8) {
                /* If the large string is ISO-8859-1, and it's not possible to
@@ -3309,13 +3309,13 @@ PP(pp_sprintf)
 PP(pp_ord)
 {
     dVAR; dSP; dTARGET;
+
     SV *argsv = POPs;
     STRLEN len;
     const U8 *s = (U8*)SvPV_const(argsv, len);
-    SV *tmpsv;
 
     if (PL_encoding && SvPOK(argsv) && !DO_UTF8(argsv)) {
-        tmpsv = sv_2mortal(newSVsv(argsv));
+        SV * const tmpsv = sv_2mortal(newSVsv(argsv));
         s = (U8*)sv_recode_to_utf8(tmpsv, PL_encoding);
         argsv = tmpsv;
     }
@@ -3453,7 +3453,7 @@ PP(pp_ucfirst)
     if (SvOK(source)) {
        s = (const U8*)SvPV_nomg_const(source, slen);
     } else {
-       s = "";
+       s = (const U8*)"";
        slen = 0;
     }
 
@@ -3466,7 +3466,7 @@ PP(pp_ucfirst)
            toLOWER_utf8(s, tmpbuf, &tculen);
        }
        /* If the two differ, we definately cannot do inplace.  */
-       inplace = ulen == tculen;
+       inplace = (ulen == tculen);
        need = slen + 1 - ulen + tculen;
     } else {
        doing_utf8 = FALSE;
@@ -3484,7 +3484,7 @@ PP(pp_ucfirst)
        dest = TARG;
 
        SvUPGRADE(dest, SVt_PV);
-       d = SvGROW(dest, need);
+       d = (U8*)SvGROW(dest, need);
        (void)SvPOK_only(dest);
 
        SETs(dest);
@@ -3577,13 +3577,13 @@ PP(pp_uc)
        if (SvOK(source)) {
            s = (const U8*)SvPV_nomg_const(source, len);
        } else {
-           s = "";
+           s = (const U8*)"";
            len = 0;
        }
        min = len + 1;
 
        SvUPGRADE(dest, SVt_PV);
-       d = SvGROW(dest, min);
+       d = (U8*)SvGROW(dest, min);
        (void)SvPOK_only(dest);
 
        SETs(dest);
@@ -3677,13 +3677,13 @@ PP(pp_lc)
        if (SvOK(source)) {
            s = (const U8*)SvPV_nomg_const(source, len);
        } else {
-           s = "";
+           s = (const U8*)"";
            len = 0;
        }
        min = len + 1;
 
        SvUPGRADE(dest, SVt_PV);
-       d = SvGROW(dest, min);
+       d = (U8*)SvGROW(dest, min);
        (void)SvPOK_only(dest);
 
        SETs(dest);
@@ -4354,7 +4354,7 @@ PP(pp_splice)
 PP(pp_push)
 {
     dVAR; dSP; dMARK; dORIGMARK; dTARGET;
-    register AV *ary = (AV*)*++MARK;
+    register AV * const ary = (AV*)*++MARK;
     const MAGIC * const mg = SvTIED_mg((SV*)ary, PERL_MAGIC_tied);
 
     if (mg) {