Subject: | unused my_vars in vutil.c and vxs.inc |
With the (admittedly rare) build options -DPERL_GLOBAL_STRUCT and -DPERL_GLOBAL_STRUCT_PRIVATE there are unused my_vars variables in vutil.c and vxs.inc. This becomes visible only when compiled with g++, which cannot use the usual "unused var" macros of Perl. (Yes, this is kind of hard to run across. But I did.) E.g.
In file included from util.c:26:0:
vutil.c: In function 'SV* Perl_new_version(PerlInterpreter*, SV*)':
perl.h:141:35: warning: unused variable 'my_vars' [-Wunused-variable]
#define pVAR struct perl_vars* my_vars PERL_UNUSED_DECL
^
perl.h:144:17: note: in expansion of macro 'pVAR'
# define dVAR pVAR = (struct perl_vars*)PERL_GET_VARS()
^
vutil.c:464:5: note: in expansion of macro 'dVAR'
dVAR;
^
Patch attached. The dVAR is only used with the above-mentioned defines, and I have cross-tested with those, the dVARs really are superfluous.
Subject: | version.vars.pat |
Message body not shown because it is not plain text.