From: Nicholas Clark Date: Mon, 19 Feb 2007 23:58:53 +0000 (+0000) Subject: Avoid *some* g++ errors. (But not all yet) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=594cd643de6a38f85185ea4c238c0784e3cf076a;p=p5sagit%2Fp5-mst-13.2.git Avoid *some* g++ errors. (But not all yet) p4raw-id: //depot/perl@30365 --- diff --git a/sv.c b/sv.c index f2a7773..ff2c9bf 100644 --- 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: diff --git a/warnings.h b/warnings.h index 5364a51..1c36628 100644 --- a/warnings.h +++ b/warnings.h @@ -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)) diff --git a/warnings.pl b/warnings.pl index f2380d9..c22d110 100644 --- a/warnings.pl +++ b/warnings.pl @@ -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))