From 9e488dd482b0cf69b8e7bb145cd8e22e43ba1f11 Mon Sep 17 00:00:00 2001 From: Corey Farrell Date: Tue, 13 Mar 2018 17:39:48 -0400 Subject: core: Remove incorrect usage of attribute_malloc. GCC documentation states that when __attribute__((malloc)) is used it should not return storage which contains any valid pointers. It specifically mentions that realloc functions should not have the malloc attribute, but this also means that complex initializers which could contain initialized pointers should not use this attribute. Change-Id: If507f33ffb3ca3b83b702196eb0e8215d27fc7d2 --- include/asterisk/stringfields.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/asterisk/stringfields.h') diff --git a/include/asterisk/stringfields.h b/include/asterisk/stringfields.h index 5ac5e0973..e1ff2fc1d 100644 --- a/include/asterisk/stringfields.h +++ b/include/asterisk/stringfields.h @@ -434,7 +434,7 @@ int __ast_string_field_init(struct ast_string_field_mgr *mgr, struct ast_string_ * \internal * \brief internal version of ast_calloc_with_stringfields */ -void * attribute_malloc __ast_calloc_with_stringfields(unsigned int num_structs, +void *__ast_calloc_with_stringfields(unsigned int num_structs, size_t struct_size, size_t field_mgr_offset, size_t field_mgr_pool_offset, size_t pool_size, const char *file, int lineno, const char *func); -- cgit v1.2.3