From 7db71c8ee43a64466f2516980f5d8f6699a9c2dd Mon Sep 17 00:00:00 2001 From: Yanfeng Liu Date: Wed, 22 May 2024 08:12:52 +0800 Subject: [PATCH] ci/riscv: fix unused var in esp_twai.c This is to fix issue in [this log](https://github.com/apache/nuttx/actions/runs/9173629303/job/25222879619): ``` Configuration/Tool: esp32c3-generic/twai esp32c6-devkitm/twai esp32c6-devkitc/twai esp32h2-devkit/twai Error: common/espressif/esp_twai.c:242:7: error: variable 'ret' set but not used [-Werror=unused-but-set-variable] ``` Signed-off-by: Yanfeng Liu --- arch/risc-v/src/common/espressif/esp_twai.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/risc-v/src/common/espressif/esp_twai.c b/arch/risc-v/src/common/espressif/esp_twai.c index 0fc2151bb4..11ffc26f07 100644 --- a/arch/risc-v/src/common/espressif/esp_twai.c +++ b/arch/risc-v/src/common/espressif/esp_twai.c @@ -251,7 +251,7 @@ static void esp_twai_reset(struct can_dev_s *dev) flags = enter_critical_section(); ret = twai_hal_init(&priv->ctx, &hal_config); - assert(ret); + ASSERT(ret); twai_hal_configure(&priv->ctx, &priv->t_config, &f_config, TWAI_DEFAULT_INTERRUPTS, 0);