From 7a174f99a30f74d92861a7eab299c2bdb1d03ad7 Mon Sep 17 00:00:00 2001 From: Darian Leung Date: Sat, 16 Feb 2019 01:42:00 +0800 Subject: [PATCH] freertos: Fix unused variable warning This commit fixes an unused variable warning when configASSERT is undefined. --- components/freertos/queue.c | 1 + components/freertos/timers.c | 1 + 2 files changed, 2 insertions(+) diff --git a/components/freertos/queue.c b/components/freertos/queue.c index a3a14931a..f6b63de5e 100644 --- a/components/freertos/queue.c +++ b/components/freertos/queue.c @@ -338,6 +338,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue; the real queue and semaphore structures. */ volatile size_t xSize = sizeof( StaticQueue_t ); configASSERT( xSize == sizeof( Queue_t ) ); + ( void ) xSize; /* Keeps lint quiet when configASSERT() is not defined. */ } #endif /* configASSERT_DEFINED */ diff --git a/components/freertos/timers.c b/components/freertos/timers.c index 6427a215e..3a86b6509 100644 --- a/components/freertos/timers.c +++ b/components/freertos/timers.c @@ -347,6 +347,7 @@ BaseType_t xReturn = pdFAIL; structures. */ volatile size_t xSize = sizeof( StaticTimer_t ); configASSERT( xSize == sizeof( Timer_t ) ); + ( void ) xSize; /* Keeps lint quiet when configASSERT() is not defined. */ } #endif /* configASSERT_DEFINED */