From: Jarkko Hietaniemi Date: Sat, 8 Apr 2006 09:58:43 +0000 (+0300) Subject: es: quiet some warnings (with a free AIX cpp insanity avoidance tip) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=de5e01c2603e3fa2c0e1b6603c7f4f31802c829d;p=p5sagit%2Fp5-mst-13.2.git es: quiet some warnings (with a free AIX cpp insanity avoidance tip) Message-ID: <44375F23.6030900@gmail.com> Date: Sat, 08 Apr 2006 09:58:43 +0300 p4raw-id: //depot/perl@27754 --- diff --git a/op.c b/op.c index 355b5cd..851d35e 100644 --- a/op.c +++ b/op.c @@ -2142,7 +2142,7 @@ Perl_fold_constants(pTHX_ register OP *o) register OP *curop; OP *newop; I32 type = o->op_type; - SV *sv; + SV *sv = NULL; int ret = 0; I32 oldscope; OP *old_next; @@ -2243,6 +2243,7 @@ Perl_fold_constants(pTHX_ register OP *o) #ifndef PERL_MAD op_free(o); #endif + assert(sv); if (type == OP_RV2GV) newop = newGVOP(OP_GV, 0, (GV*)sv); else diff --git a/pad.h b/pad.h index 022a7de..26d4e7a 100644 --- a/pad.h +++ b/pad.h @@ -147,17 +147,17 @@ Restore the old pad saved into the local variable opad by PAD_SAVE_LOCAL() ? AvARRAY((AV*)(AvARRAY(padlist)[1]))[po] : NULL; -#define PAD_SET_CUR_NOSAVE(padlist,n) \ - PL_comppad = (PAD*) (AvARRAY(padlist)[n]); \ +#define PAD_SET_CUR_NOSAVE(padlist,nth) \ + PL_comppad = (PAD*) (AvARRAY(padlist)[nth]); \ PL_curpad = AvARRAY(PL_comppad); \ DEBUG_Xv(PerlIO_printf(Perl_debug_log, \ "Pad 0x%"UVxf"[0x%"UVxf"] set_cur depth=%d\n", \ - PTR2UV(PL_comppad), PTR2UV(PL_curpad), (int)(n))); + PTR2UV(PL_comppad), PTR2UV(PL_curpad), (int)(nth))); -#define PAD_SET_CUR(padlist,n) \ +#define PAD_SET_CUR(padlist,nth) \ SAVECOMPPAD(); \ - PAD_SET_CUR_NOSAVE(padlist,n); + PAD_SET_CUR_NOSAVE(padlist,nth); #define PAD_SAVE_SETNULLPAD() SAVECOMPPAD(); \ diff --git a/pp_sys.c b/pp_sys.c index cc77d50..7a3dbc7 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -5194,7 +5194,6 @@ PP(pp_ggrent) } if (grent) { - SV *sv; PUSHs(sv_2mortal(newSVpv(grent->gr_name, 0))); #ifdef GRPASSWD