diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2014-06-23 07:01:34 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2014-06-24 16:40:24 -0400 |
commit | 23491f1decae17401c5c08e7f8a11e0d30f4f0e2 (patch) | |
tree | 4d0e6e8937eed80b3b057f9fc9dbe5365156cad4 | |
parent | a312a4316d03f9525260e26cef9e101ca6257958 (diff) | |
download | perl-23491f1decae17401c5c08e7f8a11e0d30f4f0e2.tar.gz |
Unused contexts found under PERL_GLOBAL_STRUCT.
-rw-r--r-- | gv.c | 1 | ||||
-rw-r--r-- | hv.c | 1 | ||||
-rw-r--r-- | op.c | 2 | ||||
-rw-r--r-- | perl.h | 2 | ||||
-rw-r--r-- | reentr.c | 3 | ||||
-rw-r--r-- | regen/reentr.pl | 3 | ||||
-rw-r--r-- | sv.c | 3 | ||||
-rw-r--r-- | time64.c | 1 | ||||
-rw-r--r-- | util.c | 5 |
9 files changed, 18 insertions, 3 deletions
@@ -152,6 +152,7 @@ SV * Perl_gv_const_sv(pTHX_ GV *gv) { PERL_ARGS_ASSERT_GV_CONST_SV; + PERL_UNUSED_CONTEXT; if (SvTYPE(gv) == SVt_PVGV) return cv_const_sv(GvCVu(gv)); @@ -2955,6 +2955,7 @@ Perl_hv_placeholders_get(pTHX_ const HV *hv) MAGIC * const mg = mg_find((const SV *)hv, PERL_MAGIC_rhash); PERL_ARGS_ASSERT_HV_PLACEHOLDERS_GET; + PERL_UNUSED_CONTEXT; return mg ? mg->mg_len : 0; } @@ -8254,6 +8254,7 @@ PERL_STATIC_INLINE bool is_dollar_bracket(pTHX_ const OP * const o) { const OP *kid; + PERL_UNUSED_CONTEXT; return o->op_type == OP_RV2SV && o->op_flags & OPf_KIDS && (kid = cUNOPx(o)->op_first) && kid->op_type == OP_GV @@ -10265,6 +10266,7 @@ Perl_cv_get_call_checker(pTHX_ CV *cv, Perl_call_checker *ckfun_p, SV **ckobj_p) { MAGIC *callmg; PERL_ARGS_ASSERT_CV_GET_CALL_CHECKER; + PERL_UNUSED_CONTEXT; callmg = SvMAGICAL((SV*)cv) ? mg_find((SV*)cv, PERL_MAGIC_checkcall) : NULL; if (callmg) { *ckfun_p = DPTR2FPTR(Perl_call_checker, callmg->mg_ptr); @@ -321,7 +321,7 @@ # define PERL_UNUSED_VAR(x) ((void)x) #endif -#ifdef USE_ITHREADS +#if defined(USE_ITHREADS) || defined(PERL_GLOBAL_STRUCT) # define PERL_UNUSED_CONTEXT PERL_UNUSED_ARG(my_perl) #else # define PERL_UNUSED_CONTEXT @@ -29,6 +29,7 @@ void Perl_reentrant_size(pTHX) { + PERL_UNUSED_CONTEXT; #ifdef USE_REENTRANT_API #define REENTRANTSMALLSIZE 256 /* Make something up. */ #define REENTRANTUSUALSIZE 4096 /* Make something up. */ @@ -139,6 +140,7 @@ Perl_reentrant_size(pTHX) { void Perl_reentrant_init(pTHX) { + PERL_UNUSED_CONTEXT; #ifdef USE_REENTRANT_API Newx(PL_reentrant_buffer, 1, REENTR); Perl_reentrant_size(aTHX); @@ -215,6 +217,7 @@ Perl_reentrant_init(pTHX) { void Perl_reentrant_free(pTHX) { + PERL_UNUSED_CONTEXT; #ifdef USE_REENTRANT_API #ifdef HAS_ASCTIME_R Safefree(PL_reentrant_buffer->_asctime_buffer); diff --git a/regen/reentr.pl b/regen/reentr.pl index e4cbde3bf2..f22f085da9 100644 --- a/regen/reentr.pl +++ b/regen/reentr.pl @@ -769,6 +769,7 @@ print $c <<"EOF"; void Perl_reentrant_size(pTHX) { + PERL_UNUSED_CONTEXT; #ifdef USE_REENTRANT_API #define REENTRANTSMALLSIZE 256 /* Make something up. */ #define REENTRANTUSUALSIZE 4096 /* Make something up. */ @@ -778,6 +779,7 @@ Perl_reentrant_size(pTHX) { void Perl_reentrant_init(pTHX) { + PERL_UNUSED_CONTEXT; #ifdef USE_REENTRANT_API Newx(PL_reentrant_buffer, 1, REENTR); Perl_reentrant_size(aTHX); @@ -787,6 +789,7 @@ Perl_reentrant_init(pTHX) { void Perl_reentrant_free(pTHX) { + PERL_UNUSED_CONTEXT; #ifdef USE_REENTRANT_API @free Safefree(PL_reentrant_buffer); @@ -2011,6 +2011,7 @@ S_sv_2iuv_non_preserve(pTHX_ SV *const sv dVAR; PERL_ARGS_ASSERT_SV_2IUV_NON_PRESERVE; + PERL_UNUSED_CONTEXT; DEBUG_c(PerlIO_printf(Perl_debug_log,"sv_2iuv_non '%s', IV=0x%"UVxf" NV=%"NVgf" inttype=%"UVXf"\n", SvPVX_const(sv), SvIVX(sv), SvNVX(sv), (UV)numtype)); if (SvNVX(sv) < (NV)IV_MIN) { @@ -10188,6 +10189,7 @@ void Perl_sv_untaint(pTHX_ SV *const sv) { PERL_ARGS_ASSERT_SV_UNTAINT; + PERL_UNUSED_CONTEXT; if (SvTYPE(sv) >= SVt_PVMG && SvMAGIC(sv)) { MAGIC * const mg = mg_find(sv, PERL_MAGIC_taint); @@ -10208,6 +10210,7 @@ bool Perl_sv_tainted(pTHX_ SV *const sv) { PERL_ARGS_ASSERT_SV_TAINTED; + PERL_UNUSED_CONTEXT; if (SvTYPE(sv) >= SVt_PVMG && SvMAGIC(sv)) { const MAGIC * const mg = mg_find(sv, PERL_MAGIC_taint); @@ -321,7 +321,6 @@ static struct tm * S_localtime_r(const time_t *clock, struct tm *result) { #ifndef HAS_GMTIME_R /* Simulate gmtime_r() to the best of our ability */ static struct tm * S_gmtime_r(const time_t *clock, struct tm *result) { - dTHX; /* in case the following is defined as Perl_my_gmtime(aTHX_ ...) */ const struct tm *static_result = gmtime(clock); assert(result != NULL); @@ -3390,7 +3390,8 @@ Perl_set_context(void *t) struct perl_vars * Perl_GetVars(pTHX) { - return &PL_Vars; + PERL_UNUSED_CONTEXT; + return &PL_Vars; } #endif @@ -4615,6 +4616,7 @@ Perl_init_global_struct(pTHX) # ifdef PERL_GLOBAL_STRUCT const IV nppaddr = C_ARRAY_LENGTH(Gppaddr); const IV ncheck = C_ARRAY_LENGTH(Gcheck); + PERL_UNUSED_CONTEXT; # ifdef PERL_GLOBAL_STRUCT_PRIVATE /* PerlMem_malloc() because can't use even safesysmalloc() this early. */ plvarsp = (struct perl_vars*)PerlMem_malloc(sizeof(struct perl_vars)); @@ -4672,6 +4674,7 @@ Perl_free_global_struct(pTHX_ struct perl_vars *plvarsp) int veto = plvarsp->Gveto_cleanup; PERL_ARGS_ASSERT_FREE_GLOBAL_STRUCT; + PERL_UNUSED_CONTEXT; # ifdef PERL_GLOBAL_STRUCT # ifdef PERL_UNSET_VARS PERL_UNSET_VARS(plvarsp); |