Skip to content

Commit 9d4ea4f

Browse files
committed
fix(parlio): fixed funcition with side-effect called in assert()
1 parent 484d2c5 commit 9d4ea4f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

components/esp_driver_parlio/src/parlio_rx.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,10 @@ esp_err_t parlio_rx_unit_enable(parlio_rx_unit_handle_t rx_unit, bool reset_queu
716716
xSemaphoreGive(rx_unit->trans_sem);
717717
} else if (xQueueReceive(rx_unit->trans_que, &trans, 0) == pdTRUE) {
718718
// The semaphore always supposed to be taken successfully
719-
assert(xSemaphoreTake(rx_unit->trans_sem, 0) == pdTRUE);
719+
BaseType_t res = xSemaphoreTake(rx_unit->trans_sem, 0);
720+
(void)res;
721+
assert(res == pdTRUE);
722+
720723
if (trans.flags.indirect_mount && trans.flags.infinite && rx_unit->dma_buf == NULL) {
721724
rx_unit->dma_buf = heap_caps_aligned_calloc(rx_unit->base.group->dma_align, 1, trans.size, PARLIO_DMA_MEM_ALLOC_CAPS);
722725
ESP_GOTO_ON_FALSE(rx_unit->dma_buf, ESP_ERR_NO_MEM, err, TAG, "No memory for the internal DMA buffer");

0 commit comments

Comments
 (0)