This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Storable: silence compiler 'unused func' warnings
authorDavid Mitchell <davem@iabyn.com>
Thu, 21 Nov 2013 16:21:38 +0000 (16:21 +0000)
committerDavid Mitchell <davem@iabyn.com>
Thu, 21 Nov 2013 17:12:42 +0000 (17:12 +0000)
Two static functions are only used within asserts, so only define them
if asserts are enabled

dist/Storable/Storable.xs

index 2d80cce..31e31a3 100644 (file)
@@ -1663,6 +1663,8 @@ static void free_context(pTHX_ stcxt_t *cxt)
  *** Predicates.
  ***/
 
+/* these two functions are currently only used within asserts */
+#ifdef DASSERT
 /*
  * is_storing
  *
@@ -1686,6 +1688,7 @@ static int is_retrieving(pTHX)
 
        return cxt->entry && (cxt->optype & ST_RETRIEVE);
 }
+#endif
 
 /*
  * last_op_in_netorder