From 9e4d7a131094a5a13132dec091678f488e28bdbc Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Tue, 4 Sep 2012 23:05:09 +0200 Subject: [PATCH] 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. --- op.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/op.c b/op.c index fc0306a..84d38cd 100644 --- a/op.c +++ b/op.c @@ -311,7 +311,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 @@ -741,9 +741,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() */ -- 1.8.3.1