mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +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
Friendly Automation
parent
559fa0e89c
commit
3d1bf3c537
@@ -179,7 +179,8 @@ static int create_parked_subscription_full(struct ast_channel *chan, const char
|
||||
struct parked_subscription_data *subscription_data;
|
||||
|
||||
char *parker_uuid = ast_strdupa(ast_channel_uniqueid(chan));
|
||||
size_t parker_uuid_size = strlen(parker_uuid) + 1;
|
||||
size_t parker_uuid_size;
|
||||
size_t parkee_uuid_size;
|
||||
|
||||
/* If there is already a subscription, get rid of it. */
|
||||
wipe_subscription_datastore(chan);
|
||||
@@ -193,8 +194,11 @@ static int create_parked_subscription_full(struct ast_channel *chan, const char
|
||||
return -1;
|
||||
}
|
||||
|
||||
parker_uuid_size = strlen(parker_uuid) + 1;
|
||||
parkee_uuid_size = strlen(parkee_uuid) + 1;
|
||||
|
||||
if (!(subscription_data = ast_calloc(1, sizeof(*subscription_data) + parker_uuid_size +
|
||||
strlen(parkee_uuid) + 1))) {
|
||||
parkee_uuid_size))) {
|
||||
ast_datastore_free(datastore);
|
||||
ast_free(parked_datastore);
|
||||
return -1;
|
||||
@@ -207,8 +211,7 @@ static int create_parked_subscription_full(struct ast_channel *chan, const char
|
||||
|
||||
subscription_data->hangup_after = hangup_after;
|
||||
subscription_data->parkee_uuid = subscription_data->parker_uuid + parker_uuid_size;
|
||||
strcpy(subscription_data->parkee_uuid, parkee_uuid);
|
||||
strcpy(subscription_data->parker_uuid, parker_uuid);
|
||||
ast_copy_string(subscription_data->parkee_uuid, parkee_uuid, parkee_uuid_size);
|
||||
|
||||
if (!(parked_datastore->parked_subscription = stasis_subscribe_pool(ast_parking_topic(), parker_update_cb, subscription_data))) {
|
||||
return -1;
|
||||
|
Reference in New Issue
Block a user