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.
pull/213/head^2
RichardBarry 5 years ago committed by GitHub
parent 4a026fd703
commit a9680a54cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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 hook, uncomment it, and set configCHECK_FOR_STACK_OVERFLOW to 1 in
"FreeRTOSConfig.h" header file. */ "FreeRTOSConfig.h" header file. */
// void vApplicationStackOverflowHook(TaskHandle_t *pxTask, signed char *pcTaskName ) // void vApplicationStackOverflowHook(TaskHandle_t *pxTask, char *pcTaskName )
// { // {
// for( ;; ); // for( ;; );
// } // }

@ -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 hook, uncomment it, and set configCHECK_FOR_STACK_OVERFLOW to 1 in
"FreeRTOSConfig.h" header file. */ "FreeRTOSConfig.h" header file. */
// void vApplicationStackOverflowHook(TaskHandle_t *pxTask, signed char *pcTaskName ) // void vApplicationStackOverflowHook(TaskHandle_t *pxTask, char *pcTaskName )
// { // {
// for( ;; ); // for( ;; );
// } // }

@ -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 hook, uncomment it, and set configCHECK_FOR_STACK_OVERFLOW to 1 in
"FreeRTOSConfig.h" header file. */ "FreeRTOSConfig.h" header file. */
// void vApplicationStackOverflowHook(TaskHandle_t *pxTask, signed char *pcTaskName ) // void vApplicationStackOverflowHook(TaskHandle_t *pxTask, char *pcTaskName )
// { // {
// for( ;; ); // for( ;; );
// } // }

@ -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. /* When stack overflow happens, trap instead of attempting to recover.
Read input arguments to learn about the offending task. */ Read input arguments to learn about the offending task. */

@ -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 hook, uncomment it, and set configCHECK_FOR_STACK_OVERFLOW to 1 in
"FreeRTOSConfig.h" header file. */ "FreeRTOSConfig.h" header file. */
// void vApplicationStackOverflowHook(TaskHandle_t *pxTask, signed char *pcTaskName ) // void vApplicationStackOverflowHook(TaskHandle_t *pxTask, char *pcTaskName )
// { // {
// for( ;; ); // for( ;; );
// } // }

@ -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 hook, uncomment it, and set configCHECK_FOR_STACK_OVERFLOW to 1 in
"FreeRTOSConfig.h" header file. */ "FreeRTOSConfig.h" header file. */
// void vApplicationStackOverflowHook(TaskHandle_t *pxTask, signed char *pcTaskName ) // void vApplicationStackOverflowHook(TaskHandle_t *pxTask, char *pcTaskName )
// { // {
// for( ;; ); // for( ;; );
// } // }

@ -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 hook, uncomment it, and set configCHECK_FOR_STACK_OVERFLOW to 1 in
"FreeRTOSConfig.h" header file. */ "FreeRTOSConfig.h" header file. */
// void vApplicationStackOverflowHook(TaskHandle_t *pxTask, signed char *pcTaskName ) // void vApplicationStackOverflowHook(TaskHandle_t *pxTask, char *pcTaskName )
// { // {
// for( ;; ); // for( ;; );
// } // }

@ -5,7 +5,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/> <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.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" 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.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/> <language-scope id="org.eclipse.cdt.core.g++"/>
</provider> </provider>

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

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

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

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

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

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

@ -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 /* 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 switch. Set configCHECK_FOR_STACK_OVERFLOWS to 2 to also check for stack

@ -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 /* 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 switch. Set configCHECK_FOR_STACK_OVERFLOWS to 2 to also check for stack

@ -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 /* 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 switch. Set configCHECK_FOR_STACK_OVERFLOWS to 2 to also check for stack

@ -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. /* This will get called if an overflow is detected in the stack of a task.
Inspect pxCurrentTCB to see which was the offending task. */ Inspect pxCurrentTCB to see which was the offending task. */
for( ;; ); for( ;; );

@ -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 /* This will be called if a task overflows its stack. pxCurrentTCB
can be inspected to see which is the offending task. */ can be inspected to see which is the offending task. */
for( ;; ); for( ;; );

@ -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. */ /* Look at pxCurrentTCB to see which task overflowed its stack. */
for( ;; ) for( ;; )
{ {

@ -653,8 +653,8 @@ static void prvRegTestTask2( void *pvParameters )
/* This hook function will get called if there is a suspected stack overflow. /* 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 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. */ handle needs to be used to determine the offending task. */
void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName ); void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName );
void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName ) void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName )
{ {
/* To prevent the optimiser removing the variables. */ /* To prevent the optimiser removing the variables. */
volatile TaskHandle_t xTaskIn = xTask; volatile TaskHandle_t xTaskIn = xTask;

@ -653,8 +653,8 @@ static void prvRegTestTask2( void *pvParameters )
/* This hook function will get called if there is a suspected stack overflow. /* 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 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. */ handle needs to be used to determine the offending task. */
void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName ); void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName );
void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName ) void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName )
{ {
/* To prevent the optimiser removing the variables. */ /* To prevent the optimiser removing the variables. */
volatile TaskHandle_t xTaskIn = xTask; volatile TaskHandle_t xTaskIn = xTask;

@ -659,8 +659,8 @@ static void prvRegTestTask2( void *pvParameters )
/* This hook function will get called if there is a suspected stack overflow. /* 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 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. */ handle needs to be used to determine the offending task. */
void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName ); void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName );
void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName ) void vApplicationStackOverflowHook( TaskHandle_t xTask, char *pcTaskName )
{ {
/* To prevent the optimiser removing the variables. */ /* To prevent the optimiser removing the variables. */
volatile TaskHandle_t xTaskIn = xTask; volatile TaskHandle_t xTaskIn = xTask;

Loading…
Cancel
Save