Remove compiler warnings.

This commit is contained in:
Richard Barry 2008-05-20 18:26:09 +00:00
parent 61a5a25a7f
commit 9d1b078a8f

View file

@ -137,7 +137,7 @@ static void prvErrorChecks( void *pvParameters );
* Called by the 'check' task to inspect all the standard demo tasks within * Called by the 'check' task to inspect all the standard demo tasks within
* the system, as described within the comments at the head of this page. * the system, as described within the comments at the head of this page.
*/ */
static portSHORT prvCheckOtherTasksAreStillRunning( void ); static portBASE_TYPE prvCheckOtherTasksAreStillRunning( void );
/* /*
* Perform any hardware initialisation required by the demo application. * Perform any hardware initialisation required by the demo application.
@ -148,7 +148,7 @@ static void prvSetupHardware( void );
/* xRegTestStatus will get set to pdFAIL by the regtest tasks if they /* xRegTestStatus will get set to pdFAIL by the regtest tasks if they
discover an unexpected value. */ discover an unexpected value. */
static unsigned portBASE_TYPE xRegTestStatus = pdPASS; static volatile unsigned portBASE_TYPE xRegTestStatus = pdPASS;
/* Counters used to ensure the regtest tasks are still running. */ /* Counters used to ensure the regtest tasks are still running. */
static volatile unsigned portLONG ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL; static volatile unsigned portLONG ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL;
@ -186,9 +186,9 @@ int main( void )
#endif #endif
/* Create the tasks defined within this file. */ /* Create the tasks defined within this file. */
xTaskCreate( prvRegTestTask1, "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); xTaskCreate( prvRegTestTask1, ( signed portCHAR * ) "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
xTaskCreate( prvRegTestTask2, "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); xTaskCreate( prvRegTestTask2, ( signed portCHAR * ) "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
xTaskCreate( prvErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); xTaskCreate( prvErrorChecks, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
/* The suicide tasks must be started last as they record the number of other /* The suicide tasks must be started last as they record the number of other
tasks that exist within the system. The value is then used to ensure at run tasks that exist within the system. The value is then used to ensure at run
@ -197,7 +197,7 @@ int main( void )
/* Now start the scheduler. Following this call the created tasks should /* Now start the scheduler. Following this call the created tasks should
be executing. */ be executing. */
vTaskStartScheduler( ); vTaskStartScheduler();
/* vTaskStartScheduler() will only return if an error occurs while the /* vTaskStartScheduler() will only return if an error occurs while the
idle task is being created. */ idle task is being created. */
@ -207,7 +207,7 @@ int main( void )
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
static portSHORT prvCheckOtherTasksAreStillRunning( void ) static portBASE_TYPE prvCheckOtherTasksAreStillRunning( void )
{ {
portBASE_TYPE lReturn = pdPASS; portBASE_TYPE lReturn = pdPASS;
static unsigned portLONG ulLastRegTest1Counter= 0UL, ulLastRegTest2Counter = 0UL; static unsigned portLONG ulLastRegTest1Counter= 0UL, ulLastRegTest2Counter = 0UL;
@ -319,6 +319,9 @@ static void prvErrorChecks( void *pvParameters )
portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime; portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime;
volatile unsigned portBASE_TYPE uxFreeStack; volatile unsigned portBASE_TYPE uxFreeStack;
/* Just to remove compiler warning. */
( void ) pvParameters;
/* This call is just to demonstrate the use of the function - nothing is /* This call is just to demonstrate the use of the function - nothing is
done with the value. You would expect the stack high water mark to be done with the value. You would expect the stack high water mark to be
lower (the function to return a larger value) here at function entry than lower (the function to return a larger value) here at function entry than
@ -394,6 +397,9 @@ void prvRegTestFail( void )
static void prvRegTestTask1( void *pvParameters ) static void prvRegTestTask1( void *pvParameters )
{ {
/* Just to remove compiler warning. */
( void ) pvParameters;
/* The first register test task as described at the top of this file. The /* The first register test task as described at the top of this file. The
values used in the registers are different to those use in the second values used in the registers are different to those use in the second
register test task. Also, unlike the second register test task, this task register test task. Also, unlike the second register test task, this task
@ -532,6 +538,9 @@ static void prvRegTestTask1( void *pvParameters )
static void prvRegTestTask2( void *pvParameters ) static void prvRegTestTask2( void *pvParameters )
{ {
/* Just to remove compiler warning. */
( void ) pvParameters;
/* The second register test task as described at the top of this file. /* The second register test task as described at the top of this file.
Note that this task fills the registers with different values to the Note that this task fills the registers with different values to the
first register test task. */ first register test task. */
@ -673,6 +682,10 @@ void vApplicationStackOverflowHook( xTaskHandle xTask, signed portCHAR *pcTaskNa
volatile xTaskHandle xTaskIn = xTask; volatile xTaskHandle xTaskIn = xTask;
volatile signed portCHAR *pcTaskNameIn = pcTaskName; volatile signed portCHAR *pcTaskNameIn = pcTaskName;
/* Remove compiler warnings. */
( void ) xTaskIn;
( void ) pcTaskNameIn;
/* The following three calls are simply to stop compiler warnings about the /* The following three calls are simply to stop compiler warnings about the
functions not being used - they are called from the inline assembly. */ functions not being used - they are called from the inline assembly. */
prvRegTest1Pass(); prvRegTest1Pass();