From 699a7d85766184ccf6e0b3c4c88be8924c88343a Mon Sep 17 00:00:00 2001 From: Paul Bartell Date: Fri, 5 Mar 2021 11:07:00 -0800 Subject: [PATCH] Add an LCOV_BRANCH exception for the check that sizeof( StaticQueue_t ) == sizeof( Queue_t ) --- queue.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/queue.c b/queue.c index 7ed8e9878..ecfc0f807 100644 --- a/queue.c +++ b/queue.c @@ -342,7 +342,9 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue, * variable of type StaticQueue_t or StaticSemaphore_t equals the size of * the real queue and semaphore structures. */ volatile size_t xSize = sizeof( StaticQueue_t ); - configASSERT( xSize == sizeof( Queue_t ) ); + + /* This assertion cannot be branch covered in unit tests */ + configASSERT( xSize == sizeof( Queue_t ) ); /* LCOV_EXCL_BR_LINE */ ( void ) xSize; /* Keeps lint quiet when configASSERT() is not defined. */ } #endif /* configASSERT_DEFINED */