From c8c1c12765c1ec8f18b6db9036c4c2fdd5483161 Mon Sep 17 00:00:00 2001 From: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com> Date: Mon, 20 Mar 2023 22:10:35 +0530 Subject: [PATCH] Remove cast from configMINIMAL_STACK_SIZE (#971) The configMINIMAL_STACK_SIZE was defined to PTHREAD_STACK_MIN with cast to unsigned short. This cast cab be too restrictive and result in truncation on some platforms. This commit removes this unnecessary cast. Related issue - https://github.com/FreeRTOS/FreeRTOS/issues/967 Signed-off-by: Gaurav Aggarwal --- .../Demo/FreeRTOS_Plus_TCP_Echo_Posix/FreeRTOSConfig.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Posix/FreeRTOSConfig.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Posix/FreeRTOSConfig.h index e2c416a2ed..a580b15bc1 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Posix/FreeRTOSConfig.h +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Posix/FreeRTOSConfig.h @@ -43,7 +43,7 @@ #define configUSE_TICK_HOOK 1 #define configUSE_DAEMON_TASK_STARTUP_HOOK 1 #define configTICK_RATE_HZ ( 1000 ) /* In this non-real time simulated environment the tick frequency has to be at least a multiple of the Win32 tick frequency, and therefore very slow. */ -#define configMINIMAL_STACK_SIZE ( ( unsigned short ) PTHREAD_STACK_MIN ) /* In this simulated case, the stack only has to hold one small structure as the real stack is part of the win32 thread. */ +#define configMINIMAL_STACK_SIZE ( PTHREAD_STACK_MIN ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 84 * 1024 ) ) #define configMAX_TASK_NAME_LEN ( 12 ) #define configUSE_TRACE_FACILITY 1