mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2025-08-26 04:32:57 +08:00
Demo/Posix_GCC: fix compiler flags and compiler warnings (#1351)
- Change CMakeLists.txt to set the C compiler flags instead of the C++ compiler flags. - Change to compiler warnings from "gcc -Wconversion" in main_full.c. Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com> Co-authored-by: Tony Josi <tonyjosi@amazon.com>
This commit is contained in:
@ -35,8 +35,8 @@ else()
|
||||
set( CMAKE_BUILD_TYPE "debug" )
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3")
|
||||
set(CMAKE_C_FLAGS_RELEASE "-O3")
|
||||
set(CMAKE_C_FLAGS_DEBUG "-O0 -g3")
|
||||
|
||||
if( SANITIZE_ADDRESS )
|
||||
add_compile_options( -fsanitize=address -fsanitize=alignment )
|
||||
|
@ -510,7 +510,7 @@ void vFullDemoIdleFunction( void )
|
||||
|
||||
/* Exercise heap_5 a bit. The malloc failed hook will trap failed
|
||||
* allocations so there is no need to test here. */
|
||||
pvAllocated = pvPortMalloc( ( rand() % 500 ) + 1 );
|
||||
pvAllocated = pvPortMalloc( ( size_t ) ( ( rand() % 500 ) + 1 ) );
|
||||
vPortFree( pvAllocated );
|
||||
|
||||
/* Exit after a fixed time so code coverage results are written to the
|
||||
@ -656,7 +656,8 @@ static void prvDemonstrateTimerQueryFunctions( void )
|
||||
|
||||
static void prvDemonstratePendingFunctionCall( void )
|
||||
{
|
||||
static intptr_t ulParameter1 = 1000UL, ulParameter2 = 0UL;
|
||||
static intptr_t ulParameter1 = 1000L;
|
||||
static uint32_t ulParameter2 = 0UL;
|
||||
const TickType_t xDontBlock = 0; /* This is called from the idle task so must *not* attempt to block. */
|
||||
|
||||
/* prvPendedFunction() just expects the parameters to be incremented by one
|
||||
|
Reference in New Issue
Block a user