Add Casts to UBaseType_t

This commit is contained in:
bradleysmith23 2024-02-09 14:16:30 -08:00 committed by bradleysmith23
parent 0ae52db761
commit a707cf83b8
3 changed files with 19 additions and 19 deletions

View file

@ -326,7 +326,7 @@ typedef struct xLIST
} \
\
( pxItemToRemove )->pxContainer = NULL; \
pxList->uxNumberOfItems -= 1U; \
( ( pxList )->uxNumberOfItems ) -= ( UBaseType_t ) 1U; \
} while( 0 )
/*
@ -363,17 +363,17 @@ typedef struct xLIST
\
/* Insert a new list item into ( pxList ), but rather than sort the list, \
* makes the new list item the last item to be removed by a call to \
* listGET_OWNER_OF_NEXT_ENTRY(). */ \
( pxNewListItem )->pxNext = pxIndex; \
( pxNewListItem )->pxPrevious = pxIndex->pxPrevious; \
\
pxIndex->pxPrevious->pxNext = ( pxNewListItem ); \
pxIndex->pxPrevious = ( pxNewListItem ); \
\
/* Remember which list the item is in. */ \
( pxNewListItem )->pxContainer = ( pxList ); \
\
( pxList )->uxNumberOfItems += 1U; \
* listGET_OWNER_OF_NEXT_ENTRY(). */ \
( pxNewListItem )->pxNext = pxIndex; \
( pxNewListItem )->pxPrevious = pxIndex->pxPrevious; \
\
pxIndex->pxPrevious->pxNext = ( pxNewListItem ); \
pxIndex->pxPrevious = ( pxNewListItem ); \
\
/* Remember which list the item is in. */ \
( pxNewListItem )->pxContainer = ( pxList ); \
\
( ( pxList )->uxNumberOfItems ) += ( UBaseType_t ) 1U; \
} while( 0 )
/*

6
list.c
View file

@ -130,7 +130,7 @@ void vListInsertEnd( List_t * const pxList,
/* Remember which list the item is in. */
pxNewListItem->pxContainer = pxList;
( pxList->uxNumberOfItems ) += 1U;
( pxList->uxNumberOfItems ) += ( UBaseType_t ) 1U;
traceRETURN_vListInsertEnd();
}
@ -205,7 +205,7 @@ void vListInsert( List_t * const pxList,
* item later. */
pxNewListItem->pxContainer = pxList;
( pxList->uxNumberOfItems ) += 1U;
( pxList->uxNumberOfItems ) += ( UBaseType_t ) 1U;
traceRETURN_vListInsert();
}
@ -237,7 +237,7 @@ UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove )
}
pxItemToRemove->pxContainer = NULL;
( pxList->uxNumberOfItems ) -= 1U;
( pxList->uxNumberOfItems ) -= ( UBaseType_t ) 1U;
traceRETURN_uxListRemove( pxList->uxNumberOfItems );

View file

@ -255,7 +255,7 @@
pxTemp = pxDelayedTaskList; \
pxDelayedTaskList = pxOverflowDelayedTaskList; \
pxOverflowDelayedTaskList = pxTemp; \
xNumOfOverflows += 1; \
xNumOfOverflows += ( BaseType_t ) 1; \
prvResetNextTaskUnblockTime(); \
} while( 0 )
@ -2021,7 +2021,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
* updated. */
taskENTER_CRITICAL();
{
uxCurrentNumberOfTasks += 1U;
uxCurrentNumberOfTasks += ( UBaseType_t ) 1U;
if( pxCurrentTCB == NULL )
{
@ -3807,7 +3807,7 @@ void vTaskSuspendAll( void )
/* The scheduler is suspended if uxSchedulerSuspended is non-zero. An increment
* is used to allow calls to vTaskSuspendAll() to nest. */
uxSchedulerSuspended += 1U;
uxSchedulerSuspended += ( UBaseType_t ) 1U;
/* Enforces ordering for ports and optimised compilers that may otherwise place
* the above increment elsewhere. */
@ -3960,7 +3960,7 @@ BaseType_t xTaskResumeAll( void )
* previous call to vTaskSuspendAll(). */
configASSERT( uxSchedulerSuspended != 0U );
uxSchedulerSuspended -= 1U;
uxSchedulerSuspended -= ( UBaseType_t ) 1U;
portRELEASE_TASK_LOCK();
if( uxSchedulerSuspended == ( UBaseType_t ) 0U )