From 5d1d9dfda89c4137e13695d9b9fc1795507140de Mon Sep 17 00:00:00 2001 From: Gaurav Aggarwal Date: Sun, 29 Sep 2024 09:44:21 +0000 Subject: [PATCH] Change the cast from UBaseType_t to size_t This was causing problem for 8-bit ports. This was reported here - https://github.com/feilipu/Arduino_FreeRTOS_Library/issues/136 Signed-off-by: Gaurav Aggarwal --- queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/queue.c b/queue.c index 1a14c743d..34cf17ba6 100644 --- a/queue.c +++ b/queue.c @@ -513,7 +513,7 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue, /* Check for multiplication overflow. */ ( ( SIZE_MAX / uxQueueLength ) >= uxItemSize ) && /* Check for addition overflow. */ - ( ( UBaseType_t ) ( SIZE_MAX - sizeof( Queue_t ) ) >= ( uxQueueLength * uxItemSize ) ) ) + ( ( SIZE_MAX - sizeof( Queue_t ) ) >= ( size_t ) ( uxQueueLength * uxItemSize ) ) ) { /* Allocate enough space to hold the maximum number of items that * can be in the queue at any time. It is valid for uxItemSize to be