Skip to content

Commit 9877e1c

Browse files
committedOct 19, 2023
Fix warnings when LWIP asserts are disabled
1 parent 7dd0a43 commit 9877e1c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎components/lwip/port/esp8266/freertos/sys_arch.c

+7
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ sys_mutex_lock(sys_mutex_t *pxMutex)
8181
BaseType_t ret = xSemaphoreTake(*pxMutex, portMAX_DELAY);
8282

8383
LWIP_ASSERT("failed to take the mutex", ret == pdTRUE);
84+
(void)ret;
8485
}
8586

8687
/**
@@ -94,6 +95,7 @@ sys_mutex_unlock(sys_mutex_t *pxMutex)
9495
BaseType_t ret = xSemaphoreGive(*pxMutex);
9596

9697
LWIP_ASSERT("failed to give the mutex", ret == pdTRUE);
98+
(void)ret;
9799
}
98100

99101
/**
@@ -133,6 +135,7 @@ sys_sem_new(sys_sem_t *sem, u8_t count)
133135
if (count == 1) {
134136
BaseType_t ret = xSemaphoreGive(*sem);
135137
LWIP_ASSERT("sys_sem_new: initial give failed", ret == pdTRUE);
138+
(void)ret;
136139
}
137140

138141
return ERR_OK;
@@ -150,6 +153,7 @@ sys_sem_signal(sys_sem_t *sem)
150153
/* queue full is OK, this is a signal only... */
151154
LWIP_ASSERT("sys_sem_signal: sane return value",
152155
(ret == pdTRUE) || (ret == errQUEUE_FULL));
156+
(void)ret;
153157
}
154158

155159
/*-----------------------------------------------------------------------------------*/
@@ -246,6 +250,7 @@ sys_mbox_post(sys_mbox_t *mbox, void *msg)
246250
{
247251
BaseType_t ret = xQueueSendToBack((*mbox)->os_mbox, &msg, portMAX_DELAY);
248252
LWIP_ASSERT("mbox post failed", ret == pdTRUE);
253+
(void)ret;
249254
}
250255

251256
/**
@@ -385,6 +390,8 @@ sys_mbox_free(sys_mbox_t *mbox)
385390
vQueueDelete((*mbox)->os_mbox);
386391
free(*mbox);
387392
*mbox = NULL;
393+
394+
(void)msgs_waiting;
388395
}
389396

390397
/**

0 commit comments

Comments
 (0)
Please sign in to comment.