From ed65725833ac8595f17dd73bbd9647707cf5af93 Mon Sep 17 00:00:00 2001 From: YuQing <384681@qq.com> Date: Thu, 21 Nov 2024 10:21:07 +0800 Subject: [PATCH] explicit cast for fast_mblock_alloc_object --- src/common_blocked_queue.h | 2 +- src/fast_task_queue.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common_blocked_queue.h b/src/common_blocked_queue.h index 83ff10f..51c6adf 100644 --- a/src/common_blocked_queue.h +++ b/src/common_blocked_queue.h @@ -100,7 +100,7 @@ static inline struct common_blocked_node *common_blocked_queue_alloc_node( struct common_blocked_node *node; pthread_mutex_lock(&(queue->lc_pair.lock)); - node = fast_mblock_alloc_object(&queue->mblock); + node = (struct common_blocked_node *)fast_mblock_alloc_object(&queue->mblock); pthread_mutex_unlock(&(queue->lc_pair.lock)); return node; } diff --git a/src/fast_task_queue.h b/src/fast_task_queue.h index 133d3e9..9902003 100644 --- a/src/fast_task_queue.h +++ b/src/fast_task_queue.h @@ -205,7 +205,7 @@ void free_queue_destroy(struct fast_task_queue *queue); static inline struct fast_task_info *free_queue_pop( struct fast_task_queue *queue) { - return fast_mblock_alloc_object(&queue->allocator); + return (struct fast_task_info *)fast_mblock_alloc_object(&queue->allocator); } void free_queue_push(struct fast_task_info *task);