CX_POP_SAVEARRAY(): use more distinctive var name
authorDavid Mitchell <davem@iabyn.com>
Mon, 23 May 2016 13:43:56 +0000 (14:43 +0100)
committerDavid Mitchell <davem@iabyn.com>
Mon, 23 May 2016 13:52:11 +0000 (14:52 +0100)
Under -Wshadow, CX_POP_SAVEARRAY's local var 'av' can generate this
warning:

    warning: declaration shadows a local variable [-Wshadow]

So rename it to cx_pop_savearay_av to reduce the risk of a clash.

(See http://nntp.perl.org/group/perl.perl5.porters/236444)

cop.h

diff --git a/cop.h b/cop.h
index da29572..b371379 100644 (file)
--- a/cop.h
+++ b/cop.h
@@ -609,10 +609,10 @@ struct block_format {
 /* Restore old @_ */
 #define CX_POP_SAVEARRAY(cx)                                           \
     STMT_START {                                                       \
-        AV *av = GvAV(PL_defgv);                                        \
+        AV *cx_pop_savearray_av = GvAV(PL_defgv);                       \
        GvAV(PL_defgv) = cx->blk_sub.savearray;                         \
         cx->blk_sub.savearray = NULL;                                   \
-        SvREFCNT_dec(av);                                              \
+        SvREFCNT_dec(cx_pop_savearray_av);                             \
     } STMT_END
 
 /* junk in @_ spells trouble when cloning CVs and in pp_caller(), so don't