From cc3f74b90f3995efd669ee28e8adbebe481da9de Mon Sep 17 00:00:00 2001 From: Paul Bartell Date: Fri, 5 Mar 2021 11:14:53 -0800 Subject: [PATCH] Add LCOV_BRANCH coverage exception for a configASSERT on pxQueueSetContainer with a condition that is unreachable. --- queue.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/queue.c b/queue.c index ecfc0f807..efc3d302f 100644 --- a/queue.c +++ b/queue.c @@ -2969,7 +2969,10 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue ) /* This function must be called form a critical section. */ - configASSERT( pxQueueSetContainer ); + /* The following line is not reachable in unit tests because every call + * to prvNotifyQueueSetContainer is preceded by a check that + * pxQueueSetContainer != NULL */ + configASSERT( pxQueueSetContainer ); /* LCOV_EXCL_BR_LINE */ configASSERT( pxQueueSetContainer->uxMessagesWaiting < pxQueueSetContainer->uxLength ); if( pxQueueSetContainer->uxMessagesWaiting < pxQueueSetContainer->uxLength )