summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--deb.c2
-rw-r--r--doio.c6
-rw-r--r--embed.fnc2
-rw-r--r--embed.h2
-rw-r--r--mathoms.c27
-rw-r--r--op.c1
-rw-r--r--pp_ctl.c3
-rw-r--r--proto.h2
-rw-r--r--regcomp.c2
-rw-r--r--utf8.c7
10 files changed, 48 insertions, 6 deletions
diff --git a/deb.c b/deb.c
index d16103eb1e..433ae11ddb 100644
--- a/deb.c
+++ b/deb.c
@@ -94,6 +94,8 @@ Perl_debstackptrs(pTHX)
PTR2UV(PL_mainstack), PTR2UV(AvARRAY(PL_curstack)),
PTR2UV(PL_mainstack), PTR2UV(AvFILLp(PL_curstack)),
PTR2UV(AvMAX(PL_curstack)));
+#else
+ PERL_UNUSED_CONTEXT;
#endif /* DEBUGGING */
return 0;
}
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
diff --git a/embed.fnc b/embed.fnc
index 4d06b34a15..45b48388eb 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -668,7 +668,7 @@ AMp |UV |to_uni_title |UV c|NN U8 *p|NN STRLEN *lenp
ADMpPR |bool |isIDFIRST_lazy |NN const char* p
ADMpPR |bool |isALNUM_lazy |NN const char* p
#ifdef PERL_IN_UTF8_C
-sR |U8 |to_lower_latin1|const U8 c|NULLOK U8 *p|NULLOK STRLEN *lenp
+snR |U8 |to_lower_latin1|const U8 c|NULLOK U8 *p|NULLOK STRLEN *lenp
#endif
#if defined(PERL_IN_UTF8_C) || defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C)
EXp |UV |_to_fold_latin1|const U8 c|NN U8 *p|NN STRLEN *lenp|const unsigned int flags
diff --git a/embed.h b/embed.h
index 28c0aa3c49..b2863c0b03 100644
--- a/embed.h
+++ b/embed.h
@@ -1708,7 +1708,7 @@
#define is_utf8_common(a,b,c,d) S_is_utf8_common(aTHX_ a,b,c,d)
#define swash_scan_list_line(a,b,c,d,e,f,g) S_swash_scan_list_line(aTHX_ a,b,c,d,e,f,g)
#define swatch_get(a,b,c) S_swatch_get(aTHX_ a,b,c)
-#define to_lower_latin1(a,b,c) S_to_lower_latin1(aTHX_ a,b,c)
+#define to_lower_latin1 S_to_lower_latin1
# endif
# if defined(PERL_IN_UTF8_C) || defined(PERL_IN_PP_C)
#define _to_upper_title_latin1(a,b,c,d) Perl__to_upper_title_latin1(aTHX_ a,b,c,d)
diff --git a/mathoms.c b/mathoms.c
index a1c20b015a..b284a381ae 100644
--- a/mathoms.c
+++ b/mathoms.c
@@ -728,6 +728,7 @@ bool
Perl_is_utf8_string_loc(pTHX_ const U8 *s, STRLEN len, const U8 **ep)
{
PERL_ARGS_ASSERT_IS_UTF8_STRING_LOC;
+ PERL_UNUSED_CONTEXT;
return is_utf8_string_loclen(s, len, ep, 0);
}
@@ -1278,84 +1279,98 @@ Perl_is_uni_alpha(pTHX_ UV c)
bool
Perl_is_uni_ascii(pTHX_ UV c)
{
+ PERL_UNUSED_CONTEXT;
return isASCII_uni(c);
}
bool
Perl_is_uni_blank(pTHX_ UV c)
{
+ PERL_UNUSED_CONTEXT;
return isBLANK_uni(c);
}
bool
Perl_is_uni_space(pTHX_ UV c)
{
+ PERL_UNUSED_CONTEXT;
return isSPACE_uni(c);
}
bool
Perl_is_uni_digit(pTHX_ UV c)
{
+ PERL_UNUSED_CONTEXT;
return isDIGIT_uni(c);
}
bool
Perl_is_uni_upper(pTHX_ UV c)
{
+ PERL_UNUSED_CONTEXT;
return isUPPER_uni(c);
}
bool
Perl_is_uni_lower(pTHX_ UV c)
{
+ PERL_UNUSED_CONTEXT;
return isLOWER_uni(c);
}
bool
Perl_is_uni_cntrl(pTHX_ UV c)
{
+ PERL_UNUSED_CONTEXT;
return isCNTRL_L1(c);
}
bool
Perl_is_uni_graph(pTHX_ UV c)
{
+ PERL_UNUSED_CONTEXT;
return isGRAPH_uni(c);
}
bool
Perl_is_uni_print(pTHX_ UV c)
{
+ PERL_UNUSED_CONTEXT;
return isPRINT_uni(c);
}
bool
Perl_is_uni_punct(pTHX_ UV c)
{
+ PERL_UNUSED_CONTEXT;
return isPUNCT_uni(c);
}
bool
Perl_is_uni_xdigit(pTHX_ UV c)
{
+ PERL_UNUSED_CONTEXT;
return isXDIGIT_uni(c);
}
bool
Perl_is_uni_alnum_lc(pTHX_ UV c)
{
+ PERL_UNUSED_CONTEXT;
return isWORDCHAR_LC_uvchr(c);
}
bool
Perl_is_uni_alnumc_lc(pTHX_ UV c)
{
+ PERL_UNUSED_CONTEXT;
return isALPHANUMERIC_LC_uvchr(c);
}
bool
Perl_is_uni_idfirst_lc(pTHX_ UV c)
{
+ PERL_UNUSED_CONTEXT;
/* XXX Should probably be something that resolves to the old IDFIRST, but
* this function is deprecated, so not bothering */
return isIDFIRST_LC_uvchr(c);
@@ -1364,24 +1379,28 @@ Perl_is_uni_idfirst_lc(pTHX_ UV c)
bool
Perl_is_uni_alpha_lc(pTHX_ UV c)
{
+ PERL_UNUSED_CONTEXT;
return isALPHA_LC_uvchr(c);
}
bool
Perl_is_uni_ascii_lc(pTHX_ UV c)
{
+ PERL_UNUSED_CONTEXT;
return isASCII_LC_uvchr(c);
}
bool
Perl_is_uni_blank_lc(pTHX_ UV c)
{
+ PERL_UNUSED_CONTEXT;
return isBLANK_LC_uvchr(c);
}
bool
Perl_is_uni_space_lc(pTHX_ UV c)
{
+ PERL_UNUSED_CONTEXT;
return isSPACE_LC_uvchr(c);
}
@@ -1550,6 +1569,7 @@ Perl_is_utf8_ascii(pTHX_ const U8 *p)
dVAR;
PERL_ARGS_ASSERT_IS_UTF8_ASCII;
+ PERL_UNUSED_CONTEXT;
return isASCII_utf8(p);
}
@@ -1560,6 +1580,7 @@ Perl_is_utf8_blank(pTHX_ const U8 *p)
dVAR;
PERL_ARGS_ASSERT_IS_UTF8_BLANK;
+ PERL_UNUSED_CONTEXT;
return isBLANK_utf8(p);
}
@@ -1570,6 +1591,7 @@ Perl_is_utf8_space(pTHX_ const U8 *p)
dVAR;
PERL_ARGS_ASSERT_IS_UTF8_SPACE;
+ PERL_UNUSED_CONTEXT;
return isSPACE_utf8(p);
}
@@ -1580,6 +1602,7 @@ Perl_is_utf8_perl_space(pTHX_ const U8 *p)
dVAR;
PERL_ARGS_ASSERT_IS_UTF8_PERL_SPACE;
+ PERL_UNUSED_CONTEXT;
/* Only true if is an ASCII space-like character, and ASCII is invariant
* under utf8, so can just use the macro */
@@ -1592,6 +1615,7 @@ Perl_is_utf8_perl_word(pTHX_ const U8 *p)
dVAR;
PERL_ARGS_ASSERT_IS_UTF8_PERL_WORD;
+ PERL_UNUSED_CONTEXT;
/* Only true if is an ASCII word character, and ASCII is invariant
* under utf8, so can just use the macro */
@@ -1614,6 +1638,7 @@ Perl_is_utf8_posix_digit(pTHX_ const U8 *p)
dVAR;
PERL_ARGS_ASSERT_IS_UTF8_POSIX_DIGIT;
+ PERL_UNUSED_CONTEXT;
/* Only true if is an ASCII digit character, and ASCII is invariant
* under utf8, so can just use the macro */
@@ -1646,6 +1671,7 @@ Perl_is_utf8_cntrl(pTHX_ const U8 *p)
dVAR;
PERL_ARGS_ASSERT_IS_UTF8_CNTRL;
+ PERL_UNUSED_CONTEXT;
return isCNTRL_utf8(p);
}
@@ -1686,6 +1712,7 @@ Perl_is_utf8_xdigit(pTHX_ const U8 *p)
dVAR;
PERL_ARGS_ASSERT_IS_UTF8_XDIGIT;
+ PERL_UNUSED_CONTEXT;
return isXDIGIT_utf8(p);
}
diff --git a/op.c b/op.c
index 9be7188fe8..2bd0fa938f 100644
--- a/op.c
+++ b/op.c
@@ -375,6 +375,7 @@ Perl_opslab_free(pTHX_ OPSLAB *slab)
dVAR;
OPSLAB *slab2;
PERL_ARGS_ASSERT_OPSLAB_FREE;
+ PERL_UNUSED_CONTEXT;
DEBUG_S_warn((aTHX_ "freeing slab %p", (void*)slab));
assert(slab->opslab_refcnt == 1);
for (; slab; slab = slab2) {
diff --git a/pp_ctl.c b/pp_ctl.c
index 8957a8ceed..71542dba6d 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1395,6 +1395,9 @@ S_dopoptosub_at(pTHX_ const PERL_CONTEXT *cxstk, I32 startingblock)
I32 i;
PERL_ARGS_ASSERT_DOPOPTOSUB_AT;
+#ifndef DEBUGGING
+ PERL_UNUSED_CONTEXT;
+#endif
for (i = startingblock; i >= 0; i--) {
const PERL_CONTEXT * const cx = &cxstk[i];
diff --git a/proto.h b/proto.h
index 35325941a1..3c8888e4cc 100644
--- a/proto.h
+++ b/proto.h
@@ -7724,7 +7724,7 @@ STATIC SV* S_swatch_get(pTHX_ SV* swash, UV start, UV span)
#define PERL_ARGS_ASSERT_SWATCH_GET \
assert(swash)
-STATIC U8 S_to_lower_latin1(pTHX_ const U8 c, U8 *p, STRLEN *lenp)
+STATIC U8 S_to_lower_latin1(const U8 c, U8 *p, STRLEN *lenp)
__attribute__warn_unused_result__;
#endif
diff --git a/regcomp.c b/regcomp.c
index 1a0024f3e7..b7a7b35f51 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -3026,6 +3026,7 @@ S_construct_ahocorasick_from_trie(pTHX_ RExC_state_t *pRExC_state, regnode *sour
GET_RE_DEBUG_FLAGS_DECL;
PERL_ARGS_ASSERT_CONSTRUCT_AHOCORASICK_FROM_TRIE;
+ PERL_UNUSED_CONTEXT;
#ifndef DEBUGGING
PERL_UNUSED_ARG(depth);
#endif
@@ -15231,6 +15232,7 @@ S_reginsert(pTHX_ RExC_state_t *pRExC_state, U8 op, regnode *opnd, U32 depth)
GET_RE_DEBUG_FLAGS_DECL;
PERL_ARGS_ASSERT_REGINSERT;
+ PERL_UNUSED_CONTEXT;
PERL_UNUSED_ARG(depth);
/* (PL_regkind[(U8)op] == CURLY ? EXTRA_STEP_2ARGS : 0); */
DEBUG_PARSE_FMT("inst"," - %s",PL_reg_name[op]);
diff --git a/utf8.c b/utf8.c
index 060aadab53..1e8f3f988e 100644
--- a/utf8.c
+++ b/utf8.c
@@ -869,6 +869,7 @@ Perl_valid_utf8_to_uvchr(pTHX_ const U8 *s, STRLEN *retlen)
UV uv = *s;
PERL_ARGS_ASSERT_VALID_UTF8_TO_UVCHR;
+ PERL_UNUSED_CONTEXT;
if (retlen) {
*retlen = expectlen;
@@ -1056,7 +1057,6 @@ Perl_bytes_cmp_utf8(pTHX_ const U8 *b, STRLEN blen, const U8 *u, STRLEN ulen)
const U8 *const uend = u + ulen;
PERL_ARGS_ASSERT_BYTES_CMP_UTF8;
-
PERL_UNUSED_CONTEXT;
while (b < bend && u < uend) {
@@ -1123,6 +1123,7 @@ Perl_utf8_to_bytes(pTHX_ U8 *s, STRLEN *len)
U8 *d;
PERL_ARGS_ASSERT_UTF8_TO_BYTES;
+ PERL_UNUSED_CONTEXT;
/* ensure valid UTF-8 and chars < 256 before updating string */
while (s < send) {
@@ -1174,7 +1175,6 @@ Perl_bytes_from_utf8(pTHX_ const U8 *s, STRLEN *len, bool *is_utf8)
I32 count = 0;
PERL_ARGS_ASSERT_BYTES_FROM_UTF8;
-
PERL_UNUSED_CONTEXT;
if (!*is_utf8)
return (U8 *)start;
@@ -1490,7 +1490,7 @@ Perl_to_uni_title(pTHX_ UV c, U8* p, STRLEN *lenp)
}
STATIC U8
-S_to_lower_latin1(pTHX_ const U8 c, U8* p, STRLEN *lenp)
+S_to_lower_latin1(const U8 c, U8* p, STRLEN *lenp)
{
/* We have the latin1-range values compiled into the core, so just use
* those, converting the result to utf8. Since the result is always just
@@ -1540,6 +1540,7 @@ Perl__to_fold_latin1(pTHX_ const U8 c, U8* p, STRLEN *lenp, const unsigned int f
UV converted;
PERL_ARGS_ASSERT__TO_FOLD_LATIN1;
+ PERL_UNUSED_CONTEXT;
assert (! (flags & FOLD_FLAGS_LOCALE));