Fix optimization bug and cleanup (#1363)
Some checks failed
CI Checks / git-secrets (push) Has been cancelled
CI Checks / formatting (push) Has been cancelled
CI Checks / spell-check (push) Has been cancelled
CI Checks / doxygen (push) Has been cancelled
CI Checks / verify-manifest (push) Has been cancelled
CI Checks / memory-statistics (push) Has been cancelled
CI Checks / proof_ci (push) Has been cancelled
FreeRTOS Demos / WIN32 MSVC (push) Has been cancelled
FreeRTOS Demos / WIN32 MingW (push) Has been cancelled
FreeRTOS Demos / Posix GCC (push) Has been cancelled
FreeRTOS Demos / GNU MSP430 Toolchain (push) Has been cancelled
FreeRTOS Demos / GNU ARM Toolchain (push) Has been cancelled
FreeRTOS MPU Demo / TI-Hercules RM46 and RM57 MPU Demos (push) Has been cancelled
Build FreeRTOS+ Demos / Windows Simulator Cellular Demos (push) Has been cancelled
Build FreeRTOS+ Demos / coreHTTP WinSim Demos (push) Has been cancelled
Build FreeRTOS+ Demos / corePKCS11 WinSim Demos (push) Has been cancelled
Build FreeRTOS+ Demos / core Library Windows Simulator Demos (push) Has been cancelled
Build FreeRTOS+ Demos / AWS IoT Windows Simulator Demos (push) Has been cancelled
Build FreeRTOS+ Demos / FreeRTOS+TCP Posix Simulator Demo (push) Has been cancelled
Build FreeRTOS+ Demos / FreeRTOS+TCP QEMU ARM MPS2 AN385 (push) Has been cancelled
Build FreeRTOS+ Demos / FreeRTOS+TCP Windows Simulator Demos (push) Has been cancelled
Build FreeRTOS+ Demos / FreeRTOS+CLI Windows Simulator Demos (push) Has been cancelled
Kernel Unit Tests / FreeRTOS/Source Submodule Revision (push) Has been cancelled
Kernel Unit Tests / FreeRTOS-Kernel Main Branch (push) Has been cancelled

- Compiling Demo/Common/Minimal/TimerDemo.c with "gcc -flto" breaks the
  tests, so add "volatile" modifier to "ucOneShotTimerCounter" to fix
  this.
- In Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/main_networking.c print the
  network configuration even more visible.
- In MessageBufferDemo.c and Demo/Posix_GCC/main_full.c fix compiler
  warnings from "gcc -Wwrite-strings" by adding a const modifier.

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
This commit is contained in:
Florian La Roche
2025-07-08 07:35:01 +02:00
committed by GitHub
parent 722d17b13a
commit e0aa5eac74
4 changed files with 6 additions and 4 deletions

View File

@@ -259,8 +259,10 @@ BaseType_t xTasksAlreadyCreated = pdFALSE;
#else
FreeRTOS_GetAddressConfiguration( &ulIPAddress, &ulNetMask, &ulGatewayAddress, &ulDNSServerAddress );
#endif /* defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 ) */
FreeRTOS_printf( ( "Network Configuration:\r\n\r\n" ) );
FreeRTOS_inet_ntoa( ulIPAddress, cBuffer );
FreeRTOS_printf( ( "\r\n\r\nIP Address: %s\r\n", cBuffer ) );
FreeRTOS_printf( ( "IP Address: %s\r\n", cBuffer ) );
FreeRTOS_inet_ntoa( ulNetMask, cBuffer );
FreeRTOS_printf( ( "Subnet Mask: %s\r\n", cBuffer ) );

View File

@@ -849,7 +849,7 @@ static void prvEchoServer( void * pvParameters )
static void prvSpaceAvailableCoherenceActor( void * pvParameters )
{
static char * cTxString = "12345";
static const char * cTxString = "12345";
char cRxString[ mbCOHERENCE_TEST_BYTES_WRITTEN + 1 ]; /* +1 for NULL terminator. */
( void ) pvParameters;

View File

@@ -108,7 +108,7 @@ static uint8_t ucIsStopNeededInTimerZeroCallback = ( uint8_t ) pdFALSE;
/* The one-shot timer is configured to use a callback function that increments
* ucOneShotTimerCounter each time it gets called. */
static TimerHandle_t xOneShotTimer = NULL;
static uint8_t ucOneShotTimerCounter = ( uint8_t ) 0;
static volatile uint8_t ucOneShotTimerCounter = ( uint8_t ) 0;
/* The ISR reload timer is controlled from the tick hook to exercise the timer
* API functions that can be used from an ISR. It is configured to increment

View File

@@ -183,7 +183,7 @@ static void prvReloadModeTestTimerCallback( TimerHandle_t xTimer );
/*-----------------------------------------------------------*/
/* The variable into which error messages are latched. */
static char * pcStatusMessage = "OK: No errors";
static const char * pcStatusMessage = "OK: No errors";
int xErrorCount = 0;
/* This semaphore is created purely to test using the vSemaphoreDelete() and