This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Avoid *some* g++ errors. (But not all yet)
authorNicholas Clark <nick@ccl4.org>
Mon, 19 Feb 2007 23:58:53 +0000 (23:58 +0000)
committerNicholas Clark <nick@ccl4.org>
Mon, 19 Feb 2007 23:58:53 +0000 (23:58 +0000)
p4raw-id: //depot/perl@30365

sv.c
warnings.h
warnings.pl

diff --git a/sv.c b/sv.c
index f2a7773..ff2c9bf 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -10503,7 +10503,7 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl, CLONE_PARAMS* param)
                    TOPPTR(nss,ix) = ptr;
                    o = (OP*)ptr;
                    OP_REFCNT_LOCK;
-                   OpREFCNT_inc(o);
+                   (void) OpREFCNT_inc(o);
                    OP_REFCNT_UNLOCK;
                    break;
                default:
index 5364a51..1c36628 100644 (file)
@@ -91,8 +91,9 @@
 #define isWARNf_on(c,x)        (IsSet((U8 *)(c + 1), 2*(x)+1))
 
 #define DUP_WARNINGS(p)                \
-    (STRLEN*)(specialWARN(p) ? (p)     \
-    : CopyD(p, PerlMemShared_malloc(sizeof(*p)+*p), sizeof(*p)+*p, char))
+    (specialWARN(p) ? (STRLEN*)(p)     \
+    : (STRLEN*)CopyD(p, PerlMemShared_malloc(sizeof(*p)+*p), sizeof(*p)+*p, \
+                                            char))
 
 #define ckWARN(w)              Perl_ckwarn(aTHX_ packWARN(w))
 #define ckWARN2(w1,w2)         Perl_ckwarn(aTHX_ packWARN2(w1,w2))
index f2380d9..c22d110 100644 (file)
@@ -329,8 +329,9 @@ print WARN <<'EOM';
 #define isWARNf_on(c,x)        (IsSet((U8 *)(c + 1), 2*(x)+1))
 
 #define DUP_WARNINGS(p)                \
-    (STRLEN*)(specialWARN(p) ? (p)     \
-    : CopyD(p, PerlMemShared_malloc(sizeof(*p)+*p), sizeof(*p)+*p, char))
+    (specialWARN(p) ? (STRLEN*)(p)     \
+    : (STRLEN*)CopyD(p, PerlMemShared_malloc(sizeof(*p)+*p), sizeof(*p)+*p, \
+                                            char))
 
 #define ckWARN(w)              Perl_ckwarn(aTHX_ packWARN(w))
 #define ckWARN2(w1,w2)         Perl_ckwarn(aTHX_ packWARN2(w1,w2))