mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 05:21:59 -04:00
Ensure warning free compilation under GCC.
This commit is contained in:
parent
2931f43895
commit
b6d2b739f3
|
@ -124,7 +124,7 @@ xSemaphoreHandle xMutex;
|
||||||
/* Create the demo task and pass it the queue just created. We are
|
/* Create the demo task and pass it the queue just created. We are
|
||||||
passing the queue handle by value so it does not matter that it is
|
passing the queue handle by value so it does not matter that it is
|
||||||
declared on the stack here. */
|
declared on the stack here. */
|
||||||
xTaskCreate( prvSendFrontAndBackTest, "GenQ", configMINIMAL_STACK_SIZE, ( void * ) xQueue, uxPriority, NULL );
|
xTaskCreate( prvSendFrontAndBackTest, ( signed portCHAR * )"GenQ", configMINIMAL_STACK_SIZE, ( void * ) xQueue, uxPriority, NULL );
|
||||||
|
|
||||||
/* Create the mutex used by the prvMutexTest task. */
|
/* Create the mutex used by the prvMutexTest task. */
|
||||||
xMutex = xSemaphoreCreateMutex();
|
xMutex = xSemaphoreCreateMutex();
|
||||||
|
@ -132,9 +132,9 @@ xSemaphoreHandle xMutex;
|
||||||
/* Create the mutex demo tasks and pass it the mutex just created. We are
|
/* Create the mutex demo tasks and pass it the mutex just created. We are
|
||||||
passing the mutex handle by value so it does not matter that it is declared
|
passing the mutex handle by value so it does not matter that it is declared
|
||||||
on the stack here. */
|
on the stack here. */
|
||||||
xTaskCreate( prvLowPriorityMutexTask, "MuLow", configMINIMAL_STACK_SIZE, ( void * ) xMutex, genqMUTEX_LOW_PRIORITY, NULL );
|
xTaskCreate( prvLowPriorityMutexTask, ( signed portCHAR * )"MuLow", configMINIMAL_STACK_SIZE, ( void * ) xMutex, genqMUTEX_LOW_PRIORITY, NULL );
|
||||||
xTaskCreate( prvMediumPriorityMutexTask, "MuMed", configMINIMAL_STACK_SIZE, NULL, genqMUTEX_MEDIUM_PRIORITY, &xMediumPriorityMutexTask );
|
xTaskCreate( prvMediumPriorityMutexTask, ( signed portCHAR * )"MuMed", configMINIMAL_STACK_SIZE, NULL, genqMUTEX_MEDIUM_PRIORITY, &xMediumPriorityMutexTask );
|
||||||
xTaskCreate( prvHighPriorityMutexTask, "MuHigh", configMINIMAL_STACK_SIZE, ( void * ) xMutex, genqMUTEX_HIGH_PRIORITY, &xHighPriorityMutexTask );
|
xTaskCreate( prvHighPriorityMutexTask, ( signed portCHAR * )"MuHigh", configMINIMAL_STACK_SIZE, ( void * ) xMutex, genqMUTEX_HIGH_PRIORITY, &xHighPriorityMutexTask );
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -466,6 +466,8 @@ xSemaphoreHandle xMutex = ( xSemaphoreHandle ) pvParameters;
|
||||||
|
|
||||||
static void prvMediumPriorityMutexTask( void *pvParameters )
|
static void prvMediumPriorityMutexTask( void *pvParameters )
|
||||||
{
|
{
|
||||||
|
( void ) pvParameters;
|
||||||
|
|
||||||
for( ;; )
|
for( ;; )
|
||||||
{
|
{
|
||||||
/* The medium priority task starts by suspending itself. The low
|
/* The medium priority task starts by suspending itself. The low
|
||||||
|
|
|
@ -97,10 +97,10 @@ xQueueHandle xQueue;
|
||||||
/* Create the demo tasks and pass it the queue just created. We are
|
/* Create the demo tasks and pass it the queue just created. We are
|
||||||
passing the queue handle by value so it does not matter that it is declared
|
passing the queue handle by value so it does not matter that it is declared
|
||||||
on the stack here. */
|
on the stack here. */
|
||||||
xTaskCreate( prvLowPriorityPeekTask, "PeekL", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekLOW_PRIORITY, NULL );
|
xTaskCreate( prvLowPriorityPeekTask, ( signed portCHAR * )"PeekL", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekLOW_PRIORITY, NULL );
|
||||||
xTaskCreate( prvMediumPriorityPeekTask, "PeekM", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekMEDIUM_PRIORITY, &xMediumPriorityTask );
|
xTaskCreate( prvMediumPriorityPeekTask, ( signed portCHAR * )"PeekM", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekMEDIUM_PRIORITY, &xMediumPriorityTask );
|
||||||
xTaskCreate( prvHighPriorityPeekTask, "PeekH1", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekHIGH_PRIORITY, &xHighPriorityTask );
|
xTaskCreate( prvHighPriorityPeekTask, ( signed portCHAR * )"PeekH1", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekHIGH_PRIORITY, &xHighPriorityTask );
|
||||||
xTaskCreate( prvHighestPriorityPeekTask, "PeekH2", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekHIGHEST_PRIORITY, &xHighestPriorityTask );
|
xTaskCreate( prvHighestPriorityPeekTask, ( signed portCHAR * )"PeekH2", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekHIGHEST_PRIORITY, &xHighestPriorityTask );
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -99,6 +99,8 @@ portBASE_TYPE xItem, xData;
|
||||||
portTickType xTimeWhenBlocking;
|
portTickType xTimeWhenBlocking;
|
||||||
portTickType xTimeToBlock, xBlockedTime;
|
portTickType xTimeToBlock, xBlockedTime;
|
||||||
|
|
||||||
|
( void ) pvParameters;
|
||||||
|
|
||||||
for( ;; )
|
for( ;; )
|
||||||
{
|
{
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
|
@ -354,6 +356,8 @@ static void vSecondaryBlockTimeTestTask( void *pvParameters )
|
||||||
portTickType xTimeWhenBlocking, xBlockedTime;
|
portTickType xTimeWhenBlocking, xBlockedTime;
|
||||||
portBASE_TYPE xData;
|
portBASE_TYPE xData;
|
||||||
|
|
||||||
|
( void ) pvParameters;
|
||||||
|
|
||||||
for( ;; )
|
for( ;; )
|
||||||
{
|
{
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
|
|
|
@ -130,8 +130,8 @@ void vStartCountingSemaphoreTasks( void )
|
||||||
if( ( xParameters[ 0 ].xSemaphore != NULL ) || ( xParameters[ 1 ].xSemaphore != NULL ) )
|
if( ( xParameters[ 0 ].xSemaphore != NULL ) || ( xParameters[ 1 ].xSemaphore != NULL ) )
|
||||||
{
|
{
|
||||||
/* Create the demo tasks, passing in the semaphore to use as the parameter. */
|
/* Create the demo tasks, passing in the semaphore to use as the parameter. */
|
||||||
xTaskCreate( prvCountingSemaphoreTask, "CNT1", configMINIMAL_STACK_SIZE, ( void * ) &( xParameters[ 0 ] ), tskIDLE_PRIORITY, NULL );
|
xTaskCreate( prvCountingSemaphoreTask, ( signed portCHAR * ) "CNT1", configMINIMAL_STACK_SIZE, ( void * ) &( xParameters[ 0 ] ), tskIDLE_PRIORITY, NULL );
|
||||||
xTaskCreate( prvCountingSemaphoreTask, "CNT2", configMINIMAL_STACK_SIZE, ( void * ) &( xParameters[ 1 ] ), tskIDLE_PRIORITY, NULL );
|
xTaskCreate( prvCountingSemaphoreTask, ( signed portCHAR * ) "CNT2", configMINIMAL_STACK_SIZE, ( void * ) &( xParameters[ 1 ] ), tskIDLE_PRIORITY, NULL );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
|
@ -112,14 +112,14 @@
|
||||||
#error Missing definition: configUSE_16_BIT_TICKS should be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details.
|
#error Missing definition: configUSE_16_BIT_TICKS should be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef configUSE_MUTEXES
|
|
||||||
#define configUSE_MUTEXES 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef configUSE_COUNTING_SEMAPHORES
|
#ifndef configUSE_COUNTING_SEMAPHORES
|
||||||
#define configUSE_COUNTING_SEMAPHORES 0
|
#define configUSE_COUNTING_SEMAPHORES 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef configUSE_MUTEXES
|
||||||
|
#define configUSE_MUTEXES 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ( configUSE_MUTEXES == 1 )
|
#if ( configUSE_MUTEXES == 1 )
|
||||||
/* xTaskGetCurrentTaskHandle is used by the priority inheritance mechanism
|
/* xTaskGetCurrentTaskHandle is used by the priority inheritance mechanism
|
||||||
within the mutex implementation so must be available if mutexes are used. */
|
within the mutex implementation so must be available if mutexes are used. */
|
||||||
|
|
Loading…
Reference in a new issue