Skip to content

Commit

Permalink
fix unused parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
xiazhvera committed Aug 16, 2023
1 parent e236565 commit 6177a5a
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions source/v5/mqtt5_to_mqtt3_adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,12 @@ static void s_mqtt_adapter_final_destroy_task_fn(struct aws_task *task, void *ar
AWS_LOGF_DEBUG(AWS_LS_MQTT5_TO_MQTT3_ADAPTER, "id=%p: Final destruction of mqtt3-to-5 adapter", (void *)adapter);

/* trigger the termination callback */
if(adapter->on_termination)
{
if (adapter->on_termination) {
adapter->on_termination(NULL, adapter->on_termination_user_data);
adapter->on_termination = NULL;
adapter->on_termination_user_data = NULL;
}


if (adapter->client->config->websocket_handshake_transform_user_data == adapter) {
/*
* If the mqtt5 client is pointing to us for websocket transform, then erase that. The callback
Expand Down Expand Up @@ -1093,9 +1091,8 @@ struct aws_mqtt_set_on_termination_handlers_task {
void *on_termination_ud;
};


static void s_set_on_termination_handlers_task_fn(struct aws_task *task, void *arg, enum aws_task_status status)
{
static void s_set_on_termination_handlers_task_fn(struct aws_task *task, void *arg, enum aws_task_status status) {
(void)task;
struct aws_mqtt_set_on_termination_handlers_task *set_task = arg;
struct aws_mqtt_client_connection_5_impl *adapter = set_task->adapter;
if (status != AWS_TASK_STATUS_RUN_READY) {
Expand All @@ -1110,10 +1107,8 @@ static void s_set_on_termination_handlers_task_fn(struct aws_task *task, void *a
aws_ref_count_release(&adapter->internal_refs);

aws_mem_release(set_task->allocator, set_task);

}


static struct aws_mqtt_set_on_termination_handlers_task *s_aws_mqtt_set_on_termination_handler_task_new(
struct aws_allocator *allocator,
struct aws_mqtt_client_connection_5_impl *adapter,
Expand All @@ -1132,9 +1127,10 @@ static struct aws_mqtt_set_on_termination_handlers_task *s_aws_mqtt_set_on_termi
return set_task;
}

static int s_aws_mqtt_client_connection_5_set_termination_handler(void *impl,
static int s_aws_mqtt_client_connection_5_set_termination_handler(
void *impl,
aws_mqtt_client_on_termination_fn *on_termination,
void *on_termination_ud){
void *on_termination_ud) {
struct aws_mqtt_client_connection_5_impl *adapter = impl;

struct aws_mqtt_set_on_termination_handlers_task *task =
Expand All @@ -1153,7 +1149,6 @@ static int s_aws_mqtt_client_connection_5_set_termination_handler(void *impl,
aws_event_loop_schedule_task_now(adapter->loop, &task->task);

return AWS_OP_SUCCESS;

}

struct aws_mqtt_set_on_any_publish_handler_task {
Expand Down

0 comments on commit 6177a5a

Please sign in to comment.