This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix a couple of -Dmad compiler warnings
authorDavid Mitchell <davem@iabyn.com>
Sun, 12 Sep 2010 11:27:19 +0000 (12:27 +0100)
committerDavid Mitchell <davem@iabyn.com>
Sun, 12 Sep 2010 11:27:19 +0000 (12:27 +0100)
op.c
pad.c

diff --git a/op.c b/op.c
index f49ce82..83800e1 100644 (file)
--- a/op.c
+++ b/op.c
@@ -8136,10 +8136,12 @@ Perl_ck_shift(pTHX_ OP *o)
 
        argop = newUNOP(OP_RV2AV, 0, scalar(newGVOP(OP_GV, 0, PL_argvgv)));
 #ifdef PERL_MAD
-       OP * const oldo = o;
-       o = newUNOP(type, 0, scalar(argop));
-       op_getmad(oldo,o,'O');
-       return o;
+       {
+           OP * const oldo = o;
+           o = newUNOP(type, 0, scalar(argop));
+           op_getmad(oldo,o,'O');
+           return o;
+       }
 #else
        op_free(o);
        return newUNOP(type, 0, scalar(argop));
diff --git a/pad.c b/pad.c
index 0b3c948..e945113 100644 (file)
--- a/pad.c
+++ b/pad.c
@@ -132,7 +132,8 @@ For state vars, SVs_PADSTALE is overloaded to mean 'not yet initialised'
 
 #ifdef PERL_MAD
 void pad_peg(const char* s) {
-    static int pegcnt;
+    static int pegcnt; /* XXX not threadsafe */
+    PERL_UNUSED_ARG(s);
 
     PERL_ARGS_ASSERT_PAD_PEG;