From 250be70a53b8e1a4af4cec1042fc9ce789c8ffed Mon Sep 17 00:00:00 2001 From: Richard Leach Date: Sat, 11 May 2024 13:26:27 +0000 Subject: [PATCH] S_new_SV: mark args unused, make inline, correct typo When sv_inline.h was created in https://github.com/Perl/perl5/commit/75acd14e43f2ffb698fc7032498f31095b56adb5 and a number of things moved into it, the S_new_SV debugging function should have been made PERL_STATIC_INLINE. This commit now does that. It also marks the arguments to S_new_SV as PERL_UNUSED_ARG, reducing warnings on some builds. --- sv_inline.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sv_inline.h b/sv_inline.h index 3afa6ab782e9..4a57dbd3f301 100644 --- a/sv_inline.h +++ b/sv_inline.h @@ -71,10 +71,13 @@ SV* Perl_more_sv(pTHX); #ifdef DEBUG_LEAKING_SCALARS /* provide a real function for a debugger to play with */ -STATIC SV* +PERL_STATIC_INLINE SV* S_new_SV(pTHX_ const char *file, int line, const char *func) { SV* sv; + PERL_UNUSED_ARG(file); + PERL_UNUSED_ARG(line); + PERL_UNUSED_ARG(func); if (PL_sv_root) uproot_SV(sv);