Skip to content

Commit 7225fbc

Browse files
authored
Fix datatype of queue item length macros (#1286)
The uxItemSize parameter in xQueueGenericCreate and xQueueGeneenericCreateStatic APIs expects a UBaseType_t type. Previously, the semSEMAPHORE_QUEUE_ITEM_LENGTH macro incorrectly cast the value to uint8_t, causing type mismatch warnings. This change resolves the issue by properly casting the value to UBaseType_t. This issue was reported here: #1285. Signed-off-by: Gaurav Aggarwal <[email protected]>
1 parent a882b10 commit 7225fbc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/semphr.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737

3838
typedef QueueHandle_t SemaphoreHandle_t;
3939

40-
#define semBINARY_SEMAPHORE_QUEUE_LENGTH ( ( uint8_t ) 1U )
41-
#define semSEMAPHORE_QUEUE_ITEM_LENGTH ( ( uint8_t ) 0U )
40+
#define semBINARY_SEMAPHORE_QUEUE_LENGTH ( ( UBaseType_t ) 1U )
41+
#define semSEMAPHORE_QUEUE_ITEM_LENGTH ( ( UBaseType_t ) 0U )
4242
#define semGIVE_BLOCK_TIME ( ( TickType_t ) 0U )
4343

4444

0 commit comments

Comments
 (0)