From: RichardBarry Date: Sat, 1 Dec 2007 20:56:44 +0000 (+0000) Subject: Ensure warning free compilation under GCC. X-Git-Tag: V4.7.0~2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c39a70df07426bea572cecb196200a5d8de260c7;p=freertos Ensure warning free compilation under GCC. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@122 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Demo/Common/Minimal/GenQTest.c b/Demo/Common/Minimal/GenQTest.c index 1f8eac5d7..906fea42c 100644 --- a/Demo/Common/Minimal/GenQTest.c +++ b/Demo/Common/Minimal/GenQTest.c @@ -124,7 +124,7 @@ xSemaphoreHandle xMutex; /* 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 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. */ xMutex = xSemaphoreCreateMutex(); @@ -132,9 +132,9 @@ xSemaphoreHandle xMutex; /* 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 on the stack here. */ - xTaskCreate( prvLowPriorityMutexTask, "MuLow", configMINIMAL_STACK_SIZE, ( void * ) xMutex, genqMUTEX_LOW_PRIORITY, NULL ); - xTaskCreate( prvMediumPriorityMutexTask, "MuMed", configMINIMAL_STACK_SIZE, NULL, genqMUTEX_MEDIUM_PRIORITY, &xMediumPriorityMutexTask ); - xTaskCreate( prvHighPriorityMutexTask, "MuHigh", configMINIMAL_STACK_SIZE, ( void * ) xMutex, genqMUTEX_HIGH_PRIORITY, &xHighPriorityMutexTask ); + xTaskCreate( prvLowPriorityMutexTask, ( signed portCHAR * )"MuLow", configMINIMAL_STACK_SIZE, ( void * ) xMutex, genqMUTEX_LOW_PRIORITY, NULL ); + xTaskCreate( prvMediumPriorityMutexTask, ( signed portCHAR * )"MuMed", configMINIMAL_STACK_SIZE, NULL, genqMUTEX_MEDIUM_PRIORITY, &xMediumPriorityMutexTask ); + 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 ) { + ( void ) pvParameters; + for( ;; ) { /* The medium priority task starts by suspending itself. The low diff --git a/Demo/Common/Minimal/QPeek.c b/Demo/Common/Minimal/QPeek.c index 41e40b3e6..45c5feb86 100644 --- a/Demo/Common/Minimal/QPeek.c +++ b/Demo/Common/Minimal/QPeek.c @@ -97,10 +97,10 @@ xQueueHandle xQueue; /* 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 on the stack here. */ - xTaskCreate( prvLowPriorityPeekTask, "PeekL", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekLOW_PRIORITY, NULL ); - xTaskCreate( prvMediumPriorityPeekTask, "PeekM", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekMEDIUM_PRIORITY, &xMediumPriorityTask ); - xTaskCreate( prvHighPriorityPeekTask, "PeekH1", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekHIGH_PRIORITY, &xHighPriorityTask ); - xTaskCreate( prvHighestPriorityPeekTask, "PeekH2", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekHIGHEST_PRIORITY, &xHighestPriorityTask ); + xTaskCreate( prvLowPriorityPeekTask, ( signed portCHAR * )"PeekL", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekLOW_PRIORITY, NULL ); + xTaskCreate( prvMediumPriorityPeekTask, ( signed portCHAR * )"PeekM", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekMEDIUM_PRIORITY, &xMediumPriorityTask ); + xTaskCreate( prvHighPriorityPeekTask, ( signed portCHAR * )"PeekH1", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekHIGH_PRIORITY, &xHighPriorityTask ); + xTaskCreate( prvHighestPriorityPeekTask, ( signed portCHAR * )"PeekH2", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekHIGHEST_PRIORITY, &xHighestPriorityTask ); } /*-----------------------------------------------------------*/ diff --git a/Demo/Common/Minimal/blocktim.c b/Demo/Common/Minimal/blocktim.c index 0b369a861..70166bc3b 100644 --- a/Demo/Common/Minimal/blocktim.c +++ b/Demo/Common/Minimal/blocktim.c @@ -99,6 +99,8 @@ portBASE_TYPE xItem, xData; portTickType xTimeWhenBlocking; portTickType xTimeToBlock, xBlockedTime; + ( void ) pvParameters; + for( ;; ) { /********************************************************************* @@ -354,6 +356,8 @@ static void vSecondaryBlockTimeTestTask( void *pvParameters ) portTickType xTimeWhenBlocking, xBlockedTime; portBASE_TYPE xData; + ( void ) pvParameters; + for( ;; ) { /********************************************************************* diff --git a/Demo/Common/Minimal/countsem.c b/Demo/Common/Minimal/countsem.c index dab2c0dc2..4d6d1deb4 100644 --- a/Demo/Common/Minimal/countsem.c +++ b/Demo/Common/Minimal/countsem.c @@ -130,8 +130,8 @@ void vStartCountingSemaphoreTasks( void ) if( ( xParameters[ 0 ].xSemaphore != NULL ) || ( xParameters[ 1 ].xSemaphore != NULL ) ) { /* 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, "CNT2", configMINIMAL_STACK_SIZE, ( void * ) &( xParameters[ 1 ] ), tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvCountingSemaphoreTask, ( signed portCHAR * ) "CNT1", configMINIMAL_STACK_SIZE, ( void * ) &( xParameters[ 0 ] ), tskIDLE_PRIORITY, NULL ); + xTaskCreate( prvCountingSemaphoreTask, ( signed portCHAR * ) "CNT2", configMINIMAL_STACK_SIZE, ( void * ) &( xParameters[ 1 ] ), tskIDLE_PRIORITY, NULL ); } } /*-----------------------------------------------------------*/ diff --git a/Source/include/FreeRTOS.h b/Source/include/FreeRTOS.h index 35e4426e9..ea8b46ad4 100644 --- a/Source/include/FreeRTOS.h +++ b/Source/include/FreeRTOS.h @@ -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. #endif -#ifndef configUSE_MUTEXES - #define configUSE_MUTEXES 0 -#endif - #ifndef configUSE_COUNTING_SEMAPHORES #define configUSE_COUNTING_SEMAPHORES 0 #endif +#ifndef configUSE_MUTEXES + #define configUSE_MUTEXES 0 +#endif + #if ( configUSE_MUTEXES == 1 ) /* xTaskGetCurrentTaskHandle is used by the priority inheritance mechanism within the mutex implementation so must be available if mutexes are used. */