From: Andy Lester Date: Tue, 7 Feb 2006 16:36:56 +0000 (-0600) Subject: Handle unused args X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=294a48e93682c45d53fd3e8adb7bbdd7068cbb1d;p=p5sagit%2Fp5-mst-13.2.git Handle unused args Message-ID: <20060207223656.GA5177@petdance.com> p4raw-id: //depot/perl@27129 --- diff --git a/doio.c b/doio.c index 8d55d3f..dfd48d2 100644 --- a/doio.c +++ b/doio.c @@ -1974,7 +1974,8 @@ Perl_do_ipcget(pTHX_ I32 optype, SV **mark, SV **sp) const key_t key = (key_t)SvNVx(*++mark); const I32 n = (optype == OP_MSGGET) ? 0 : SvIVx(*++mark); const I32 flags = SvIVx(*++mark); - (void)sp; + + PERL_UNUSED_ARG(sp); SETERRNO(0,0); switch (optype) diff --git a/pad.c b/pad.c index 0b61c3c..0a446db 100644 --- a/pad.c +++ b/pad.c @@ -1562,6 +1562,8 @@ Perl_pad_fixup_inner_anons(pTHX_ PADLIST *padlist, CV *old_cv, CV *new_cv) AV * const comppad = (AV*)AvARRAY(padlist)[1]; SV ** const namepad = AvARRAY(comppad_name); SV ** const curpad = AvARRAY(comppad); + PERL_UNUSED_ARG(old_cv); + for (ix = AvFILLp(comppad_name); ix > 0; ix--) { const SV * const namesv = namepad[ix]; if (namesv && namesv != &PL_sv_undef diff --git a/perl.c b/perl.c index c9058bb..3a17b48 100644 --- a/perl.c +++ b/perl.c @@ -4196,6 +4196,8 @@ FIX YOUR KERNEL, OR PUT A C WRAPPER AROUND THIS SCRIPT!\n"); Perl_croak(aTHX_ "Can't do setuid (suidperl cannot exec perl)\n"); #endif /* IAMSUID */ #else /* !DOSUID */ + PERL_UNUSED_ARG(fdscript); + PERL_UNUSED_ARG(suidscript); if (PL_euid != PL_uid || PL_egid != PL_gid) { /* (suidperl doesn't exist, in fact) */ #ifndef SETUID_SCRIPTS_ARE_SECURE_NOW PerlLIO_fstat(PerlIO_fileno(PL_rsfp),&PL_statbuf); /* may be either wrapped or real suid */ @@ -4210,8 +4212,8 @@ FIX YOUR KERNEL, PUT A C WRAPPER AROUND THIS SCRIPT, OR USE -u AND UNDUMP!\n"); /* not set-id, must be wrapped */ } #endif /* DOSUID */ - (void)validarg; - (void)scriptname; + PERL_UNUSED_ARG(validarg); + PERL_UNUSED_ARG(scriptname); } STATIC void diff --git a/pp_sys.c b/pp_sys.c index 1659888..8e8004a 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -307,8 +307,8 @@ S_emulate_eaccess(pTHX_ const char* path, Mode_t mode) STATIC int S_emulate_eaccess(pTHX_ const char* path, Mode_t mode) { - (void)path; - (void)mode; + PERL_UNUSED_ARG(path); + PERL_UNUSED_ARG(mode); Perl_croak(aTHX_ "switching effective uid is not implemented"); /*NOTREACHED*/ return -1;