summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2014-06-18 18:56:45 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2014-06-19 14:08:12 -0400
commit8161153450000b2b806ca000eae18af7e430d3d9 (patch)
treea58ca2b81fa04c1b965c3575c7c97317ed2ade1f /doio.c
parenta25b59276cf9505a41280bad7847c33234f7e7c6 (diff)
downloadperl-8161153450000b2b806ca000eae18af7e430d3d9.tar.gz
Silence -Wunused-parameter my_perl under threads.
For S_ functions, remove the context. For Perl_ functions, add PERL_UNUSED_CONTEXT. Tricky because sometimes depends on DEBUGGING, and sometimes on whether we are have PERL_IMPLICIT_SYS. (Why all the mathoms Perl_is_uni_... and Perl_is_utf8_... functions are not being whined about is a mystery.) vutil.c (included via util.c) has one of these, but it's cpan/, and a known problem: https://rt.cpan.org/Ticket/Display.html?id=96100
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/doio.c b/doio.c
index 762903ec16..feb52dff95 100644
--- a/doio.c
+++ b/doio.c
@@ -1198,6 +1198,7 @@ int
Perl_mode_from_discipline(pTHX_ const char *s, STRLEN len)
{
int mode = O_BINARY;
+ PERL_UNUSED_CONTEXT;
if (s) {
while (*s) {
if (*s == ':') {
@@ -2049,6 +2050,7 @@ Perl_cando(pTHX_ Mode_t mode, bool effective, const Stat_t *statbufp)
dVAR;
PERL_ARGS_ASSERT_CANDO;
+ PERL_UNUSED_CONTEXT;
#ifdef DOSISH
/* [Comments and code from Len Reed]
@@ -2107,6 +2109,10 @@ static bool
S_ingroup(pTHX_ Gid_t testgid, bool effective)
{
dVAR;
+#ifndef PERL_IMPLICIT_SYS
+ /* PERL_IMPLICIT_SYS like Win32: getegid() etc. require the context. */
+ PERL_UNUSED_CONTEXT;
+#endif
if (testgid == (effective ? PerlProc_getegid() : PerlProc_getgid()))
return TRUE;
#ifdef HAS_GETGROUPS