Skip to content

Commit e21783e

Browse files
committed
Add a bunch of PERL_UNUSED_ARG calls
These should silence warnings on MingW.
1 parent 10eed7f commit e21783e

File tree

5 files changed

+13
-1
lines changed

5 files changed

+13
-1
lines changed

mg.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3803,6 +3803,7 @@ Perl_perly_sighandler(int sig, Siginfo_t *sip PERL_UNUSED_DECL,
38033803
/* Not clear if this will work */
38043804
/* XXX not clear if this should be protected by 'if (safe)'
38053805
* too */
3806+
PERL_UNUSED_ARG(safe);
38063807

38073808
(void)rsignal(sig, SIG_IGN);
38083809
(void)rsignal(sig, PL_csighandlerp);

perl.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4406,7 +4406,9 @@ S_init_ids(pTHX)
44064406
bool
44074407
Perl_doing_taint(int argc, char *argv[], char *envp[])
44084408
{
4409-
#ifndef PERL_IMPLICIT_SYS
4409+
#ifdef PERL_IMPLICIT_SYS
4410+
PERL_UNUSED_ARG(envp);
4411+
#else
44104412
/* If we have PERL_IMPLICIT_SYS we can't call getuid() et alia
44114413
* before we have an interpreter-- and the whole point of this
44124414
* function is to be called at such an early stage. If you are on

pp_sys.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5558,6 +5558,7 @@ PP_wrapped(pp_shostent, 1, 0)
55585558
{
55595559
dSP;
55605560
const int stayopen = TOPi;
5561+
PERL_UNUSED_VAR(stayopen);
55615562
switch(PL_op->op_type) {
55625563
case OP_SHOSTENT:
55635564
#ifdef HAS_SETHOSTENT

util.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2940,6 +2940,7 @@ Perl_rsignal(pTHX_ int signo, Sighandler_t handler)
29402940
static Signal_t
29412941
sig_trap(int signo)
29422942
{
2943+
PERL_UNUSED_ARG(signo);
29432944
PL_sig_trapped++;
29442945
}
29452946

win32/win32sck.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,13 +780,16 @@ win32_getnetent(void)
780780
struct netent *
781781
win32_getnetbyname(char *name)
782782
{
783+
PERL_UNUSED_ARG(name);
783784
win32_croak_not_implemented("getnetbyname");
784785
return (struct netent *)NULL;
785786
}
786787

787788
struct netent *
788789
win32_getnetbyaddr(long net, int type)
789790
{
791+
PERL_UNUSED_ARG(net);
792+
PERL_UNUSED_ARG(type);
790793
win32_croak_not_implemented("getnetbyaddr");
791794
return (struct netent *)NULL;
792795
}
@@ -808,27 +811,31 @@ win32_getservent(void)
808811
void
809812
win32_sethostent(int stayopen)
810813
{
814+
PERL_UNUSED_ARG(stayopen);
811815
win32_croak_not_implemented("sethostent");
812816
}
813817

814818

815819
void
816820
win32_setnetent(int stayopen)
817821
{
822+
PERL_UNUSED_ARG(stayopen);
818823
win32_croak_not_implemented("setnetent");
819824
}
820825

821826

822827
void
823828
win32_setprotoent(int stayopen)
824829
{
830+
PERL_UNUSED_ARG(stayopen);
825831
win32_croak_not_implemented("setprotoent");
826832
}
827833

828834

829835
void
830836
win32_setservent(int stayopen)
831837
{
838+
PERL_UNUSED_ARG(stayopen);
832839
win32_croak_not_implemented("setservent");
833840
}
834841

0 commit comments

Comments
 (0)