Skip to content

Conversation

@tonycoz
Copy link
Contributor

@tonycoz tonycoz commented Dec 3, 2024

This would warn if you built with -DDEBUG_LEAKING_SCALARS and without -DDEBUGGING and without -DPERL_MEM_LOG, since these enable the code that actually uses the parameters.

sv_inline.h: In function 'Perl_new_sv':
sv_inline.h:72:31: warning: unused parameter 'file' [-Wunused-parameter]
72 | Perl_new_sv(pTHX_ const char *file, int line, const char *func)
| ~~~~~~~~~~~~^~~~
sv_inline.h:72:41: warning: unused parameter 'line' [-Wunused-parameter]
72 | Perl_new_sv(pTHX_ const char *file, int line, const char *func)
| ~~~~^~~~
sv_inline.h:72:59: warning: unused parameter 'func' [-Wunused-parameter]
72 | Perl_new_sv(pTHX_ const char *file, int line, const char *func)
| ~~~~~~~~~~~~^~~~

Fixes #22806

TODO: fill description here


This set of changes does not require a perldelta entry.

This would warn if you built with -DDEBUG_LEAKING_SCALARS and without
-DDEBUGGING and without -DPERL_MEM_LOG, since these enable the code
that actually uses the parameters.

sv_inline.h: In function 'Perl_new_sv':
sv_inline.h:72:31: warning: unused parameter 'file' [-Wunused-parameter]
   72 | Perl_new_sv(pTHX_ const char *file, int line, const char *func)
      |                   ~~~~~~~~~~~~^~~~
sv_inline.h:72:41: warning: unused parameter 'line' [-Wunused-parameter]
   72 | Perl_new_sv(pTHX_ const char *file, int line, const char *func)
      |                                     ~~~~^~~~
sv_inline.h:72:59: warning: unused parameter 'func' [-Wunused-parameter]
   72 | Perl_new_sv(pTHX_ const char *file, int line, const char *func)
      |                                               ~~~~~~~~~~~~^~~~

Fixes Perl#22806
@jkeenan jkeenan added the build-time-warnings Replaces [META] Build-time warnings RT #133556 label Dec 3, 2024
@jkeenan
Copy link
Contributor

jkeenan commented Dec 3, 2024

I configured and built on FreeBSD-13 and Debian Linux 11 using both clang and gcc like this:

$ sh ./Configure -des -Dusedevel -Accflags='-DDEBUG_LEAKING_SCALARS' -Dcc=gcc

All build-time warnings cleared up. Ran the test suite on 2 of the 4 instances; PASS.

In the commit message, the line beginning with TODO should be removed. Otherwise, LGTM.

@tonycoz tonycoz merged commit e1e4896 into Perl:blead Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-time-warnings Replaces [META] Build-time warnings RT #133556

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'-DDEBUG_LEAKING_SCALARS` and build-time-warnings and build-time-failures

3 participants