Correct potential compiler warning when configUSE_MUTEXES is set to 0.

Add comments.
pull/1/head
Richard Barry 11 years ago
parent a60ce58731
commit 99229b597b

@ -1103,7 +1103,7 @@ BaseType_t xTimerPendFunctionCall( PendedFunction_t xFunctionToPend, void *pvPar
*
* @return The name assigned to the timer specified by the xTimer parameter.
*/
const char * pcTimerGetTimerName( TimerHandle_t xTimer );
const char * pcTimerGetTimerName( TimerHandle_t xTimer ); /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
/*
* Functions beyond this part are not part of the public API and are intended

@ -461,7 +461,7 @@ QueueHandle_t xReturn = NULL;
taskEXIT_CRITICAL();
return pxReturn;
}
} /*lint !e818 xSemaphore cannot be a pointer to const because it is a typedef. */
#endif
/*-----------------------------------------------------------*/
@ -1247,7 +1247,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
mtCOVERAGE_TEST_MARKER();
}
}
#endif
#endif /* configUSE_MUTEXES */
if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )
{
@ -1695,7 +1695,7 @@ BaseType_t xReturn = pdFALSE;
static void prvCopyDataFromQueue( Queue_t * const pxQueue, void * const pvBuffer )
{
if( pxQueue->uxItemSize != 0 )
if( pxQueue->uxItemSize != ( UBaseType_t ) 0 )
{
pxQueue->u.pcReadFrom += pxQueue->uxItemSize;
if( pxQueue->u.pcReadFrom >= pxQueue->pcTail ) /*lint !e946 MISRA exception justified as use of the relational operator is the cleanest solutions. */

@ -330,7 +330,7 @@ PRIVILEGED_DATA static volatile UBaseType_t uxSchedulerSuspended = ( UBaseType_t
or suspended list then it won't be in a ready list. */
#define taskRESET_READY_PRIORITY( uxPriority ) \
{ \
if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ ( uxPriority ) ] ) ) == 0 ) \
if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ ( uxPriority ) ] ) ) == ( UBaseType_t ) 0 ) \
{ \
portRESET_READY_PRIORITY( ( uxPriority ), ( uxTopReadyPriority ) ); \
} \
@ -1000,7 +1000,7 @@ TCB_t * pxNewTCB;
}
return eReturn;
}
} /*lint !e818 xTask cannot be a pointer to const because it is a typedef. */
#endif /* INCLUDE_eTaskGetState */
/*-----------------------------------------------------------*/
@ -1728,7 +1728,7 @@ UBaseType_t uxTaskGetNumberOfTasks( void )
#if ( INCLUDE_pcTaskGetTaskName == 1 )
char *pcTaskGetTaskName( TaskHandle_t xTaskToQuery )
char *pcTaskGetTaskName( TaskHandle_t xTaskToQuery ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
{
TCB_t *pxTCB;
@ -3039,13 +3039,13 @@ TCB_t *pxNewTCB;
{
uint32_t ulCount = 0U;
while( *pucStackByte == tskSTACK_FILL_BYTE )
while( *pucStackByte == ( uint8_t ) tskSTACK_FILL_BYTE )
{
pucStackByte -= portSTACK_GROWTH;
ulCount++;
}
ulCount /= ( uint32_t ) sizeof( StackType_t );
ulCount /= ( uint32_t ) sizeof( StackType_t ); /*lint !e961 Casting is not redundant on smaller architectures. */
return ( uint16_t ) ulCount;
}
@ -3252,7 +3252,7 @@ TCB_t *pxTCB;
if( pxTCB->uxPriority != pxTCB->uxBasePriority )
{
/* Only disinherit if no other mutexes are held. */
if( pxTCB->uxMutexesHeld == 0 )
if( pxTCB->uxMutexesHeld == ( UBaseType_t ) 0 )
{
/* The holding task must be the running task to be able to give
the mutex back. Remove the holding task from the ready list. */
@ -3587,9 +3587,9 @@ TickType_t uxReturn;
}
/*-----------------------------------------------------------*/
void *pvTaskIncrementMutexHeldCount( void )
{
#if ( configUSE_MUTEXES == 1 )
#if ( configUSE_MUTEXES == 1 )
void *pvTaskIncrementMutexHeldCount( void )
{
/* If xSemaphoreCreateMutex() is called before any tasks have been created
then pxCurrentTCB will be NULL. */
@ -3600,8 +3600,9 @@ void *pvTaskIncrementMutexHeldCount( void )
return pxCurrentTCB;
}
#endif
}
#endif /* configUSE_MUTEXES */
/*-----------------------------------------------------------*/
#ifdef FREERTOS_MODULE_TEST

@ -591,7 +591,7 @@ TickType_t xTimeNow;
{
/* Negative commands are pended function calls rather than timer
commands. */
if( xMessage.xMessageID < 0 )
if( xMessage.xMessageID < ( BaseType_t ) 0 )
{
const CallbackParameters_t * const pxCallback = &( xMessage.u.xCallbackParameters );

Loading…
Cancel
Save