add any_op field to the ANY savestack union
authorDavid Mitchell <davem@iabyn.com>
Wed, 17 Aug 2016 06:52:57 +0000 (07:52 +0100)
committerDavid Mitchell <davem@iabyn.com>
Wed, 17 Aug 2016 06:54:05 +0000 (07:54 +0100)
This is an attempt to silence a (probably spurious) Coverity warning.

perl.h
scope.c

diff --git a/perl.h b/perl.h
index 43f1a53..23b6431 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -3801,6 +3801,7 @@ union any {
     GV*         any_gv;
     AV*         any_av;
     HV*         any_hv;
+    OP*         any_op;
     char*       any_pv;
     char**      any_pvp;
     I32                any_i32;
diff --git a/scope.c b/scope.c
index ff84e64..ba0f263 100644 (file)
--- a/scope.c
+++ b/scope.c
@@ -1106,7 +1106,7 @@ Perl_leave_scope(pTHX_ I32 base)
        case SAVEt_FREEOP:
             a0 = ap[0];
            ASSERT_CURPAD_LEGAL("SAVEt_FREEOP");
-           op_free((OP*)a0.any_ptr);
+           op_free(a0.any_op);
            break;
 
        case SAVEt_FREEPV: