mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 10:33:13 +00:00
Don't declare a function that takes variable arguments as inline, because it's
not valid, and on some compilers, will emit a warning. http://gcc.gnu.org/onlinedocs/gcc/Inline.html#Inline (closes issue #12289) Reported by: francesco_r Patches by Tilghman, final patch by me git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
14
main/utils.c
14
main/utils.c
@@ -1363,4 +1363,18 @@ int ast_utils_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef __AST_DEBUG_MALLOC
|
||||
int _ast_asprintf(char **ret, const char *file, int lineno, const char *func, const char *fmt, ...)
|
||||
{
|
||||
int res;
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
if ((res = vasprintf(ret, fmt, ap)) == -1) {
|
||||
MALLOC_FAILURE_MSG;
|
||||
}
|
||||
va_end(ap);
|
||||
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user