diff options
author | Brian Fraser <fraserbn@gmail.com> | 2014-05-31 16:54:22 +0200 |
---|---|---|
committer | Brian Fraser <fraserbn@gmail.com> | 2014-06-13 00:00:33 +0200 |
commit | dc3bf405700292479bd7ac9b4b914cabd6567c33 (patch) | |
tree | 17a4589bbc50f498dcc2609f9e6ea3718990391b /util.c | |
parent | acfd4d8e7fdfa20116069fff8faae1108f58a00e (diff) | |
download | perl-dc3bf405700292479bd7ac9b4b914cabd6567c33.tar.gz |
Silence several -Wunused-parameter warnings about my_perl
This meant sprinkling some PERL_UNUSED_CONTEXT invocations,
as well as stopping some functions from getting my_perl in
the first place; all of the functions in the latter category
are internal (S_ prefix and s or i in embed.fnc), so
this should be both safe and economical.
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1094,6 +1094,9 @@ Perl_savesharedpv(pTHX_ const char *pv) { char *newaddr; STRLEN pvlen; + + PERL_UNUSED_CONTEXT; + if (!pv) return NULL; @@ -1119,6 +1122,7 @@ Perl_savesharedpvn(pTHX_ const char *const pv, const STRLEN len) { char *const newaddr = (char*)PerlMemShared_malloc(len + 1); + PERL_UNUSED_CONTEXT; /* PERL_ARGS_ASSERT_SAVESHAREDPVN; */ if (!newaddr) { @@ -3595,12 +3599,14 @@ Perl_init_tm(pTHX_ struct tm *ptm) /* see mktime, strftime and asctime */ #ifdef HAS_TM_TM_ZONE Time_t now; const struct tm* my_tm; + PERL_UNUSED_CONTEXT; PERL_ARGS_ASSERT_INIT_TM; (void)time(&now); my_tm = localtime(&now); if (my_tm) Copy(my_tm, ptm, 1, struct tm); #else + PERL_UNUSED_CONTEXT; PERL_ARGS_ASSERT_INIT_TM; PERL_UNUSED_ARG(ptm); #endif @@ -5385,8 +5391,10 @@ Perl_my_dirfd(pTHX_ DIR * dir) { if(!dir) return -1; #ifdef HAS_DIRFD + PERL_UNUSED_CONTEXT; return dirfd(dir); #elif defined(HAS_DIR_DD_FD) + PERL_UNUSED_CONTEXT; return dir->dd_fd; #else Perl_die(aTHX_ PL_no_func, "dirfd"); |