From: Rafael Garcia-Suarez Date: Tue, 17 Jan 2006 21:45:37 +0000 (+0000) Subject: Gisle points out that it's ok to ignore the return value of newSVrv. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=81e08b8aadcad25663c7f2cda0bb6fdffa6a6ae7;p=p5sagit%2Fp5-mst-13.2.git Gisle points out that it's ok to ignore the return value of newSVrv. Due to how embed.pl is implemented, this also has the unfortunate side-effect of removing __attribute__malloc__ from the attributes of this function, but given that the new pointer is stored elsewhere anyway, this shouldn't impact what gcc could have optimized. p4raw-id: //depot/perl@26885 --- diff --git a/embed.fnc b/embed.fnc index 2f0a8fd..d3fd5bb 100644 --- a/embed.fnc +++ b/embed.fnc @@ -553,7 +553,7 @@ Apda |SV* |newSVhek |NULLOK const HEK *hek Apda |SV* |newSVpvn_share |NULLOK const char* s|I32 len|U32 hash Afpda |SV* |newSVpvf |NN const char* pat|... Apa |SV* |vnewSVpvf |NN const char* pat|NULLOK va_list* args -Apda |SV* |newSVrv |NN SV* rv|NULLOK const char* classname +Apd |SV* |newSVrv |NN SV* rv|NULLOK const char* classname Apda |SV* |newSVsv |NULLOK SV* old Apa |OP* |newUNOP |I32 type|I32 flags|NULLOK OP* first Apa |OP* |newWHENOP |NULLOK OP* cond|NN OP* block diff --git a/proto.h b/proto.h index 2ec9550..d80f969 100644 --- a/proto.h +++ b/proto.h @@ -1585,8 +1585,6 @@ PERL_CALLCONV SV* Perl_vnewSVpvf(pTHX_ const char* pat, va_list* args) __attribute__nonnull__(pTHX_1); PERL_CALLCONV SV* Perl_newSVrv(pTHX_ SV* rv, const char* classname) - __attribute__malloc__ - __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); PERL_CALLCONV SV* Perl_newSVsv(pTHX_ SV* old)