Permalink
Browse files

avoid unused-var warnings in compiled XS

Code generated by ExtUtils-ParseXS for certain kinds of XS sub
was creating an "items" variable and never using it, resulting in
distracting warnings from the C compiler.  Add "PERL_UNUSED_VAR(items)"
where appropriate.
  • Loading branch information...
Zefram
Zefram committed Nov 14, 2017
1 parent eb32218 commit 5a110b650b77b81109b3eb6a18658cfcdf30deff
@@ -1,5 +1,9 @@
Revision history for Perl extension ExtUtils::ParseXS.
3.36
- Make generated code avoid warnings about the "items" variable
being unused
3.35 - Mon Jul 31 17:50:00 CET 2017
- Fix ExtUtils-ParseXS/t/*.t that needed '.' in @INC (David Mitchell)
- Remove impediment to compiling under C++11 (Karl Williamson)
@@ -11,7 +11,7 @@ use Symbol;
our $VERSION;
BEGIN {
$VERSION = '3.35';
$VERSION = '3.36';
}
use ExtUtils::ParseXS::Constants $VERSION;
use ExtUtils::ParseXS::CountLines $VERSION;
@@ -519,9 +519,10 @@ EOF
EOF
}
else {
# cv likely to be unused
# cv and items likely to be unused
print Q(<<"EOF");
# PERL_UNUSED_VAR(cv); /* -W */
# PERL_UNUSED_VAR(items); /* -W */
EOF
}
@@ -871,6 +872,7 @@ EOF
#XS_EUPXS(XS_$self->{Packid}_nil)
#{
# dXSARGS;
# PERL_UNUSED_VAR(items);
# XSRETURN_EMPTY;
#}
#
@@ -3,7 +3,7 @@ use strict;
use warnings;
use Symbol;
our $VERSION = '3.35';
our $VERSION = '3.36';
=head1 NAME
@@ -1,7 +1,7 @@
package ExtUtils::ParseXS::CountLines;
use strict;
our $VERSION = '3.35';
our $VERSION = '3.36';
our $SECTION_END_MARKER;
@@ -2,7 +2,7 @@ package ExtUtils::ParseXS::Eval;
use strict;
use warnings;
our $VERSION = '3.35';
our $VERSION = '3.36';
=head1 NAME
@@ -5,7 +5,7 @@ use Exporter;
use File::Spec;
use ExtUtils::ParseXS::Constants ();
our $VERSION = '3.35';
our $VERSION = '3.36';
our (@ISA, @EXPORT_OK);
@ISA = qw(Exporter);
@@ -2,7 +2,7 @@ package ExtUtils::Typemaps;
use 5.006001;
use strict;
use warnings;
our $VERSION = '3.35';
our $VERSION = '3.36';
require ExtUtils::ParseXS;
require ExtUtils::ParseXS::Constants;
@@ -2,7 +2,7 @@ package ExtUtils::Typemaps::Cmd;
use 5.006001;
use strict;
use warnings;
our $VERSION = '3.35';
our $VERSION = '3.36';
use ExtUtils::Typemaps;
@@ -2,7 +2,7 @@ package ExtUtils::Typemaps::InputMap;
use 5.006001;
use strict;
use warnings;
our $VERSION = '3.35';
our $VERSION = '3.36';
=head1 NAME
@@ -2,7 +2,7 @@ package ExtUtils::Typemaps::OutputMap;
use 5.006001;
use strict;
use warnings;
our $VERSION = '3.35';
our $VERSION = '3.36';
=head1 NAME
@@ -4,7 +4,7 @@ use strict;
use warnings;
require ExtUtils::Typemaps;
our $VERSION = '3.35';
our $VERSION = '3.36';
=head1 NAME

0 comments on commit 5a110b6

Please sign in to comment.