Fix warnings after moving callback prototypes (#208)

* Recently the prototypes for the application hook functions were
moved out of the kernel .c files and into the .h files.  That
changes results in compile time warnings for projects that provide
hook functions with a slightly different prototype - in particular
where signed char * is used in place of just char * as an older
FreeRTOS coding convention required chars to be explicitly qualified
as signed or unsigned.

This checkin fixes the warnings by ensuring the signature of
implemented hook functions matches the signature of the prototypes.
This commit is contained in:
RichardBarry
2020-08-27 00:40:47 -07:00
committed by GitHub
parent 4a026fd703
commit a9680a54cf
23 changed files with 122 additions and 113 deletions

View File

@ -78,7 +78,7 @@ This is usefull in application development, for debugging. To use this
hook, uncomment it, and set configCHECK_FOR_STACK_OVERFLOW to 1 in
"FreeRTOSConfig.h" header file. */
// void vApplicationStackOverflowHook(TaskHandle_t *pxTask, signed char *pcTaskName )
// void vApplicationStackOverflowHook(TaskHandle_t *pxTask, char *pcTaskName )
// {
// for( ;; );
// }

View File

@ -78,7 +78,7 @@ This is usefull in application development, for debugging. To use this
hook, uncomment it, and set configCHECK_FOR_STACK_OVERFLOW to 1 in
"FreeRTOSConfig.h" header file. */
// void vApplicationStackOverflowHook(TaskHandle_t *pxTask, signed char *pcTaskName )
// void vApplicationStackOverflowHook(TaskHandle_t *pxTask, char *pcTaskName )
// {
// for( ;; );
// }

View File

@ -78,7 +78,7 @@ This is usefull in application development, for debugging. To use this
hook, uncomment it, and set configCHECK_FOR_STACK_OVERFLOW to 1 in
"FreeRTOSConfig.h" header file. */
// void vApplicationStackOverflowHook(TaskHandle_t *pxTask, signed char *pcTaskName )
// void vApplicationStackOverflowHook(TaskHandle_t *pxTask, char *pcTaskName )
// {
// for( ;; );
// }

View File

@ -141,7 +141,7 @@ void vApplicationIdleHook( void )
/*-----------------------------------------------------------*/
void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName )
void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName )
{
/* When stack overflow happens, trap instead of attempting to recover.
Read input arguments to learn about the offending task. */

View File

@ -78,7 +78,7 @@ This is usefull in application development, for debugging. To use this
hook, uncomment it, and set configCHECK_FOR_STACK_OVERFLOW to 1 in
"FreeRTOSConfig.h" header file. */
// void vApplicationStackOverflowHook(TaskHandle_t *pxTask, signed char *pcTaskName )
// void vApplicationStackOverflowHook(TaskHandle_t *pxTask, char *pcTaskName )
// {
// for( ;; );
// }

View File

@ -78,7 +78,7 @@ This is usefull in application development, for debugging. To use this
hook, uncomment it, and set configCHECK_FOR_STACK_OVERFLOW to 1 in
"FreeRTOSConfig.h" header file. */
// void vApplicationStackOverflowHook(TaskHandle_t *pxTask, signed char *pcTaskName )
// void vApplicationStackOverflowHook(TaskHandle_t *pxTask, char *pcTaskName )
// {
// for( ;; );
// }

View File

@ -78,7 +78,7 @@ This is usefull in application development, for debugging. To use this
hook, uncomment it, and set configCHECK_FOR_STACK_OVERFLOW to 1 in
"FreeRTOSConfig.h" header file. */
// void vApplicationStackOverflowHook(TaskHandle_t *pxTask, signed char *pcTaskName )
// void vApplicationStackOverflowHook(TaskHandle_t *pxTask, char *pcTaskName )
// {
// for( ;; );
// }

View File

@ -5,7 +5,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-920242998058162869" id="ilg.gnuarmeclipse.managedbuild.cross.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT ARM Cross GCC Built-in Compiler Settings " parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="1283716845372686666" id="ilg.gnuarmeclipse.managedbuild.cross.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT ARM Cross GCC Built-in Compiler Settings " parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>

View File

@ -158,7 +158,7 @@ extern void vSetupHighFrequencyTimer( void );
/*
* Hook functions that can get called by the kernel.
*/
void vApplicationStackOverflowHook( TaskHandle_t *pxTask, signed char *pcTaskName );
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );
void vApplicationTickHook( void );
/*
@ -379,8 +379,8 @@ void ( *vOLEDClear )( void ) = NULL;
}
/*-----------------------------------------------------------*/
volatile signed char *pcOverflowedTask = NULL; /* Prevent task name being optimised away. */
void vApplicationStackOverflowHook( TaskHandle_t *pxTask, signed char *pcTaskName )
volatile char *pcOverflowedTask = NULL; /* Prevent task name being optimised away. */
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
{
( void ) pxTask;
pcOverflowedTask = pcTaskName;

View File

@ -185,7 +185,7 @@ extern void vSetupHighFrequencyTimer( void );
/*
* Hook functions that can get called by the kernel.
*/
void vApplicationStackOverflowHook( TaskHandle_t *pxTask, signed char *pcTaskName );
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );
void vApplicationTickHook( void );
static void prvPrintString( const char * pcString );
@ -453,8 +453,8 @@ void ( *vOLEDClear )( void ) = NULL;
}
/*-----------------------------------------------------------*/
volatile signed char *pcOverflowedTask = NULL;
void vApplicationStackOverflowHook( TaskHandle_t *pxTask, signed char *pcTaskName )
volatile char *pcOverflowedTask = NULL;
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
{
( void ) pxTask;
pcOverflowedTask = pcTaskName;

View File

@ -88,7 +88,7 @@ static void prvCreateTasks( void )
/*-----------------------------------------------------------*/
/* Stack overflow hook. */
void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName )
void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName )
{
/* Force an assert. */
configASSERT( pcTaskName == 0 );

View File

@ -131,7 +131,7 @@ static void prvCreateTasks( void )
/*-----------------------------------------------------------*/
/* Stack overflow hook. */
void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName )
void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName )
{
/* Force an assert. */
configASSERT( pcTaskName == 0 );

View File

@ -101,7 +101,7 @@ void SystemInit( void )
/*-----------------------------------------------------------*/
/* Stack overflow hook. */
void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName )
void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName )
{
/* Force an assert. */
configASSERT( pcTaskName == 0 );

View File

@ -126,7 +126,7 @@ static void prvCreateTasks( void )
/*-----------------------------------------------------------*/
/* Stack overflow hook. */
void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName )
void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName )
{
/* Force an assert. */
configASSERT( pcTaskName == 0 );

View File

@ -238,7 +238,7 @@ void prvSetupHardware( void )
}
/*-----------------------------------------------------------*/
void vApplicationStackOverflowHook( TaskHandle_t *pxTask, signed char *pcTaskName )
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
{
/* This will get called if a stack overflow is detected during the context
switch. Set configCHECK_FOR_STACK_OVERFLOWS to 2 to also check for stack

View File

@ -285,7 +285,7 @@ static const unsigned long _cfm[6] = {
}
/*-----------------------------------------------------------*/
void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName )
void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )
{
/* This will get called if a stack overflow is detected during the context
switch. Set configCHECK_FOR_STACK_OVERFLOWS to 2 to also check for stack

View File

@ -253,7 +253,7 @@ void prvSetupHardware( void )
}
/*-----------------------------------------------------------*/
void vApplicationStackOverflowHook( TaskHandle_t *pxTask, signed char *pcTaskName )
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
{
/* This will get called if a stack overflow is detected during the context
switch. Set configCHECK_FOR_STACK_OVERFLOWS to 2 to also check for stack

View File

@ -362,8 +362,11 @@ void vRegTestError( void )
}
/*-----------------------------------------------------------*/
void vApplicationStackOverflowHook( void )
void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName )
{
( void ) xTask;
( void ) pcTaskName;
/* This will get called if an overflow is detected in the stack of a task.
Inspect pxCurrentTCB to see which was the offending task. */
for( ;; );

View File

@ -252,8 +252,11 @@ static void prvSetupHardware( void )
}
/*-----------------------------------------------------------*/
void vApplicationStackOverflowHook( void )
void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName )
{
( void ) xTask;
( void ) pcTaskName;
/* This will be called if a task overflows its stack. pxCurrentTCB
can be inspected to see which is the offending task. */
for( ;; );

View File

@ -192,8 +192,11 @@ static void prvSetupHardware( void )
}
/*-----------------------------------------------------------*/
void vApplicationStackOverflowHook( void )
void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName )
{
( void ) xTask;
( void ) pcTaskName;
/* Look at pxCurrentTCB to see which task overflowed its stack. */
for( ;; )
{

View File

@ -653,8 +653,8 @@ static void prvRegTestTask2( void *pvParameters )
/* This hook function will get called if there is a suspected stack overflow.
An overflow can cause the task name to be corrupted, in which case the task
handle needs to be used to determine the offending task. */
void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName );
void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName )
void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName );
void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName )
{
/* To prevent the optimiser removing the variables. */
volatile TaskHandle_t xTaskIn = xTask;

View File

@ -653,8 +653,8 @@ static void prvRegTestTask2( void *pvParameters )
/* This hook function will get called if there is a suspected stack overflow.
An overflow can cause the task name to be corrupted, in which case the task
handle needs to be used to determine the offending task. */
void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName );
void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName )
void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName );
void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName )
{
/* To prevent the optimiser removing the variables. */
volatile TaskHandle_t xTaskIn = xTask;

View File

@ -659,8 +659,8 @@ static void prvRegTestTask2( void *pvParameters )
/* This hook function will get called if there is a suspected stack overflow.
An overflow can cause the task name to be corrupted, in which case the task
handle needs to be used to determine the offending task. */
void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName );
void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName )
void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName );
void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName )
{
/* To prevent the optimiser removing the variables. */
volatile TaskHandle_t xTaskIn = xTask;