mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-07 05:34:59 -05:00
Modify the condition for ignoring compiler warning for the cast operation.
Before modification: Compiler warning was ignored only on MinGW64 After modification: Compiler warning is ignored on MinGW32 and MinGW64 Reason of modification: The cast warning here is unavoidable not only on MinGW64 but also on MinGW32. "__GNUC__" macro is used because MSVC does not recognize this #pragma directive.
This commit is contained in:
parent
04c3fcbcc2
commit
cb855794b8
1 changed files with 3 additions and 3 deletions
|
|
@ -247,15 +247,15 @@ StackType_t * pxPortInitialiseStack( StackType_t * pxTopOfStack,
|
|||
NULL ); /* No name. */
|
||||
|
||||
|
||||
#ifdef __x86_64__
|
||||
/* MinGW-w64 compiler reports the warning for the cast operation from TaskFunction_t to LPTHREAD_START_ROUTINE. */
|
||||
#ifdef __GNUC__
|
||||
/* GCC reports the warning for the cast operation from TaskFunction_t to LPTHREAD_START_ROUTINE. */
|
||||
/* Disable this warning here by the #pragma option. */
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wcast-function-type"
|
||||
#endif
|
||||
/* Create the thread itself. */
|
||||
pxThreadState->pvThread = CreateThread( NULL, xStackSize, ( LPTHREAD_START_ROUTINE ) pxCode, pvParameters, CREATE_SUSPENDED | STACK_SIZE_PARAM_IS_A_RESERVATION, NULL );
|
||||
#ifdef __x86_64__
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue