mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
Compiler fixes for gcc 10
This patch fixes a few compile warnings/errors that now occur when using gcc 10+. Also, the Makefile.rules check to turn off partial inlining in gcc versions greater or equal to 8.2.1 had a bug where it only it only checked against versions with at least 3 numbers (ex: 8.2.1 vs 10). This patch now ensures any version above the specified version is correctly compared. Change-Id: I54718496eb0c3ce5bd6d427cd279a29e8d2825f9
This commit is contained in:
committed by
George Joseph
parent
c7406a5b48
commit
f59001d171
@@ -313,13 +313,14 @@ static void gosub_release_frame(struct ast_channel *chan, struct gosub_stack_fra
|
||||
static struct gosub_stack_frame *gosub_allocate_frame(const char *context, const char *extension, int priority, int in_subroutine, unsigned char arguments)
|
||||
{
|
||||
struct gosub_stack_frame *new = NULL;
|
||||
int len_extension = strlen(extension), len_context = strlen(context);
|
||||
int len_extension = strlen(extension) + 1;
|
||||
int len_context = strlen(context) + 1;
|
||||
|
||||
if ((new = ast_calloc(1, sizeof(*new) + 2 + len_extension + len_context))) {
|
||||
if ((new = ast_calloc(1, sizeof(*new) + len_extension + len_context))) {
|
||||
AST_LIST_HEAD_INIT_NOLOCK(&new->varshead);
|
||||
strcpy(new->extension, extension);
|
||||
new->context = new->extension + len_extension + 1;
|
||||
strcpy(new->context, context);
|
||||
ast_copy_string(new->extension, extension, len_extension);
|
||||
new->context = new->extension + len_extension;
|
||||
ast_copy_string(new->context, context, len_context);
|
||||
new->priority = priority;
|
||||
new->in_subroutine = in_subroutine ? 1 : 0;
|
||||
new->arguments = arguments;
|
||||
|
Reference in New Issue
Block a user