In perl.git, the branch smoke-me/quieten-readonly-ops has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/e2d6efaaef87d294a2ca4a1ab40af776f505e518?hp=2c247e84d4c0ff4b5c5fe6c10b3257c55520332a>

- Log -----------------------------------------------------------------
commit e2d6efaaef87d294a2ca4a1ab40af776f505e518
Author: Nicholas Clark <[email protected]>
Date:   Tue Sep 4 23:05:09 2012 +0200

    Terser fix to avoid warning about an empty body for Slab_to_rw().
    
    Slab_to_rw() is only defined as a function with -DPERL_DEBUG_READONLY_OPS.
    This approach to silencing the warning feels more robust, because it ensures
    that Slab_to_rw() acts as a single statement whatever compile-time options
    are used.
-----------------------------------------------------------------------

Summary of changes:
 op.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/op.c b/op.c
index 9e176ad..142ba30 100644
--- a/op.c
+++ b/op.c
@@ -283,7 +283,7 @@ Perl_Slab_to_rw(pTHX_ OPSLAB *const slab)
 }
 
 #else
-#  define Slab_to_rw(op)
+#  define Slab_to_rw(op)    NOOP
 #endif
 
 /* This cannot possibly be right, but it was copied from the old slab
@@ -709,9 +709,8 @@ Perl_op_free(pTHX_ OP *o)
     if (type == OP_NULL)
        type = (OPCODE)o->op_targ;
 
-    if (o->op_slabbed) {
-       Slab_to_rw(OpSLAB(o));
-    }
+    if (o->op_slabbed)
+        Slab_to_rw(OpSLAB(o));
 
     /* COP* is not cleared by op_clear() so that we may track line
      * numbers etc even after null() */

--
Perl5 Master Repository

Reply via email to