1 Sep
2019
1 Sep
'19
2:29 a.m.
perl.h requires that the user declare a static PerlInterpreter * named 'my_perl', but also shadows this declaration in functions declared with the XS() macro. As there's no way to avoid this issue, turn off this warning here so we can fix -Wshadow warnings elsewhere. Signed-off-by: Eric Blake <eblake@redhat.com> --- plugins/perl/perl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/perl/perl.c b/plugins/perl/perl.c index 59b26788..b0886bb6 100644 --- a/plugins/perl/perl.c +++ b/plugins/perl/perl.c @@ -50,6 +50,9 @@ #include "cleanup.h" +/* Use of perl.h insists on shadowing my_perl during XS(). */ +#pragma GCC diagnostic ignored "-Wshadow" + static PerlInterpreter *my_perl; static const char *script; -- 2.21.0