fix warning in PmopSTASH_set()
authorDavid Mitchell <davem@iabyn.com>
Mon, 10 Dec 2012 16:28:19 +0000 (16:28 +0000)
committerDavid Mitchell <davem@iabyn.com>
Mon, 10 Dec 2012 16:28:19 +0000 (16:28 +0000)
In the threaded version of PmopSTASH_set(), the assigned value is a
PADOFFSET, not a pointer; so use 0 rather than NULL for the default value.

This keeps clang happy.

op.h

index c1800df..286b880 100644 (file)
--- a/op.h
+++ b/op.h
@@ -457,7 +457,7 @@ struct pmop {
 #  define PmopSTASH_set(o,hv)  \
        (assert_((o)->op_pmflags & PMf_ONCE)                            \
         (o)->op_pmstashstartu.op_pmstashoff =                          \
-           (hv) ? alloccopstash(hv) : NULL)
+           (hv) ? alloccopstash(hv) : 0)
 #else
 #  define PmopSTASH(o)                                                 \
     (((o)->op_pmflags & PMf_ONCE) ? (o)->op_pmstashstartu.op_pmstash : NULL)