From de7c014e92ec3dd07c91ac741ddd17a63d4c4676 Mon Sep 17 00:00:00 2001 From: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com> Date: Mon, 30 Sep 2024 11:20:04 +0530 Subject: [PATCH] Change the cast from UBaseType_t to size_t (#1153) This was causing problem for 8-bit ports. This was reported here - https://github.com/FreeRTOS/FreeRTOS-Kernel/issues/1151 Signed-off-by: Gaurav Aggarwal --- queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/queue.c b/queue.c index 1a14c743d8a..34cf17ba69a 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