From db9578e9be418e543b77569d5ec4cb2afd627a6a Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sun, 20 Nov 2011 09:03:26 -0700 Subject: embed.fnc: swash_init() return value should not be ignored Otherwise can have memory leaks --- embed.fnc | 2 +- proto.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/embed.fnc b/embed.fnc index 9f7183acc5..c58794649b 100644 --- a/embed.fnc +++ b/embed.fnc @@ -1354,7 +1354,7 @@ Apd |void |sv_vsetpvfn |NN SV *const sv|NN const char *const pat|const STRLEN pa |NULLOK va_list *const args|NULLOK SV **const svargs \ |const I32 svmax|NULLOK bool *const maybe_tainted ApR |NV |str_to_version |NN SV *sv -Ap |SV* |swash_init |NN const char* pkg|NN const char* name|NN SV* listsv|I32 minbits|I32 none +ApR |SV* |swash_init |NN const char* pkg|NN const char* name|NN SV* listsv|I32 minbits|I32 none Ap |UV |swash_fetch |NN SV *swash|NN const U8 *ptr|bool do_utf8 #ifdef PERL_IN_REGCOMP_C EiMR |SV* |add_cp_to_invlist |NULLOK SV* invlist|const UV cp diff --git a/proto.h b/proto.h index a6a1a44526..e0939ebaa8 100644 --- a/proto.h +++ b/proto.h @@ -4387,6 +4387,7 @@ PERL_CALLCONV UV Perl_swash_fetch(pTHX_ SV *swash, const U8 *ptr, bool do_utf8) assert(swash); assert(ptr) PERL_CALLCONV SV* Perl_swash_init(pTHX_ const char* pkg, const char* name, SV* listsv, I32 minbits, I32 none) + __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); -- cgit v1.2.1