Gisle points out that it's ok to ignore the return value of newSVrv.
Rafael Garcia-Suarez [Tue, 17 Jan 2006 21:45:37 +0000 (21:45 +0000)]
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

embed.fnc
proto.h

index 2f0a8fd..d3fd5bb 100644 (file)
--- 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 (file)
--- 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)