Remove empty expression statement compiler warning (#692)

* Add do while( 0 ) loop for empty expression statement compiler warning
This commit is contained in:
chinglee-iot
2023-07-06 10:44:24 +08:00
committed by GitHub
parent 1c5eca348f
commit d0a490e491
6 changed files with 28 additions and 26 deletions

View File

@ -95,13 +95,13 @@ typedef QueueHandle_t SemaphoreHandle_t;
*/
#if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
#define vSemaphoreCreateBinary( xSemaphore ) \
{ \
do { \
( xSemaphore ) = xQueueGenericCreate( ( UBaseType_t ) 1, semSEMAPHORE_QUEUE_ITEM_LENGTH, queueQUEUE_TYPE_BINARY_SEMAPHORE ); \
if( ( xSemaphore ) != NULL ) \
{ \
( void ) xSemaphoreGive( ( xSemaphore ) ); \
} \
}
} while( 0 )
#endif
/**