summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gv.c1
-rw-r--r--hv.c1
-rw-r--r--op.c2
-rw-r--r--perl.h2
-rw-r--r--reentr.c3
-rw-r--r--regen/reentr.pl3
-rw-r--r--sv.c3
-rw-r--r--time64.c1
-rw-r--r--util.c5
9 files changed, 18 insertions, 3 deletions
diff --git a/gv.c b/gv.c
index 1ef1155372..13fa6d469f 100644
--- a/gv.c
+++ b/gv.c
@@ -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));
diff --git a/hv.c b/hv.c
index db3ce635a2..72dd463e43 100644
--- a/hv.c
+++ b/hv.c
@@ -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;
}
diff --git a/op.c b/op.c
index 132b58ece5..169296adb1 100644
--- a/op.c
+++ b/op.c
@@ -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);
diff --git a/perl.h b/perl.h
index 9e3c7433de..cae83f2a44 100644
--- a/perl.h
+++ b/perl.h
@@ -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
diff --git a/reentr.c b/reentr.c
index 917807c50c..9a10dcae51 100644
--- a/reentr.c
+++ b/reentr.c
@@ -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);
diff --git a/sv.c b/sv.c
index 73745e400b..b938d8b0de 100644
--- a/sv.c
+++ b/sv.c
@@ -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);
diff --git a/time64.c b/time64.c
index 72a5a971cd..555286b5e0 100644
--- a/time64.c
+++ b/time64.c
@@ -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);
diff --git a/util.c b/util.c
index f2e537be26..a9931043cb 100644
--- a/util.c
+++ b/util.c
@@ -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);