From 786c64af0662b4a8065763ac3e808a6e3188d4fe Mon Sep 17 00:00:00 2001 From: Evelyne Donnaes Date: Wed, 25 Nov 2020 14:56:04 +0000 Subject: [PATCH] Fix ThisThread warnings --- rtos/source/ThisThread.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rtos/source/ThisThread.cpp b/rtos/source/ThisThread.cpp index 5494dcc5ff..b5c00372d7 100644 --- a/rtos/source/ThisThread.cpp +++ b/rtos/source/ThisThread.cpp @@ -223,6 +223,7 @@ void ThisThread::sleep_for(Clock::duration_u32 rel_time) #if MBED_CONF_RTOS_PRESENT osStatus_t status = osDelay(rel_time.count()); MBED_ASSERT(status == osOK); + (void) status; #else thread_sleep_for(rel_time.count()); #endif @@ -242,10 +243,12 @@ void ThisThread::sleep_until(Clock::time_point abs_time) if (abs_time - now > wait_for_u32_max) { osStatus_t status = osDelay(wait_for_u32_max.count()); MBED_ASSERT(status == osOK); + (void) status; continue; } else { osStatus_t status = osDelay((abs_time - now).count()); MBED_ASSERT(status == osOK); + (void) status; break; } }