fix: 消除staticMem变量未使用告警

位置:kernel/src/los_queue.c:169
当宏LOSCFG_BASE_IPC_QUEUE_STATIC不为1时,消除编译器unused告警

Signed-off-by: Peijie Shao <shaopeijie@gmail.com>
This commit is contained in:
Peijie Shao 2024-08-19 23:57:50 +08:00
parent 10e00b3047
commit 1dc3eea7a8
1 changed files with 2 additions and 0 deletions

View File

@ -166,6 +166,8 @@ static UINT32 OsQueueCreate(const CHAR *queueName,
unusedQueue = LOS_DL_LIST_FIRST(&(g_freeQueueList)); unusedQueue = LOS_DL_LIST_FIRST(&(g_freeQueueList));
} }
#else #else
(void)staticMem;
queue = (UINT8 *)LOS_MemAlloc(m_aucSysMem0, (UINT32)len * msgSize); queue = (UINT8 *)LOS_MemAlloc(m_aucSysMem0, (UINT32)len * msgSize);
if (queue == NULL) { if (queue == NULL) {
return LOS_ERRNO_QUEUE_CREATE_NO_MEMORY; return LOS_ERRNO_QUEUE_CREATE_NO_MEMORY;