This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
shared.xs: remove dead code
authorDavid Mitchell <davem@iabyn.com>
Tue, 24 Nov 2015 12:56:18 +0000 (12:56 +0000)
committerDavid Mitchell <davem@iabyn.com>
Tue, 24 Nov 2015 12:56:18 +0000 (12:56 +0000)
Since v5.23.4-26-g0b057af made static a bunch a functions not used
outside their own src files, gcc has been complaining:

    shared.xs:1172:1: warning: ‘Perl_sharedsv_unlock’ defined but not used [-Wunused-function]
     Perl_sharedsv_unlock(pTHX_ SV *ssv)

So "delete" this function using '#if 0'

dist/threads-shared/lib/threads/shared.pm
dist/threads-shared/shared.xs

index 8b0c950..dc76ab2 100644 (file)
@@ -7,7 +7,7 @@ use warnings;
 
 use Scalar::Util qw(reftype refaddr blessed);
 
-our $VERSION = '1.49'; # Please update the pod, too.
+our $VERSION = '1.50'; # Please update the pod, too.
 my $XS_VERSION = $VERSION;
 $VERSION = eval $VERSION;
 
index 66dadec..e323788 100644 (file)
@@ -1166,6 +1166,8 @@ const MGVTBL sharedsv_array_vtbl = {
 };
 
 
+#if 0
+/* XXX unused dead code */
 /* Recursively unlocks a shared sv. */
 
 static void
@@ -1175,6 +1177,7 @@ Perl_sharedsv_unlock(pTHX_ SV *ssv)
     assert(ul);
     recursive_lock_release(aTHX_ &ul->lock);
 }
+#endif
 
 
 /* Recursive locks on a sharedsv.