Revert "MISRA Rule 13.3 Fixes"

This reverts commit 4b63ff8f28.
This commit is contained in:
bradleysmith23 2024-02-06 15:13:26 -08:00
parent 32528235bd
commit c3a9b0b994
3 changed files with 12 additions and 11 deletions

View file

@ -326,7 +326,7 @@ typedef struct xLIST
} \
\
( pxItemToRemove )->pxContainer = NULL; \
pxList->uxNumberOfItems -= 1U; \
( pxList->uxNumberOfItems )--; \
} while( 0 )
/*
@ -373,7 +373,7 @@ typedef struct xLIST
/* Remember which list the item is in. */ \
( pxNewListItem )->pxContainer = ( pxList ); \
\
( pxList )->uxNumberOfItems += 1U; \
( ( pxList )->uxNumberOfItems )++; \
} while( 0 )
/*

9
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 )++;
traceRETURN_vListInsertEnd();
}
@ -205,13 +205,12 @@ void vListInsert( List_t * const pxList,
* item later. */
pxNewListItem->pxContainer = pxList;
pxList->uxNumberOfItems += 1U;
( pxList->uxNumberOfItems )++;
traceRETURN_vListInsert();
}
/*-----------------------------------------------------------*/
UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove )
{
/* The list item knows which list it is in. Obtain the list from the list
@ -220,6 +219,8 @@ UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove )
traceENTER_uxListRemove( pxItemToRemove );
pxItemToRemove->pxNext->pxPrevious = pxItemToRemove->pxPrevious;
pxItemToRemove->pxPrevious->pxNext = pxItemToRemove->pxNext;
@ -237,7 +238,7 @@ UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove )
}
pxItemToRemove->pxContainer = NULL;
pxList->uxNumberOfItems -= 1U;
( pxList->uxNumberOfItems )--;
traceRETURN_uxListRemove( pxList->uxNumberOfItems );

10
tasks.c
View file

@ -255,7 +255,7 @@
pxTemp = pxDelayedTaskList; \
pxDelayedTaskList = pxOverflowDelayedTaskList; \
pxOverflowDelayedTaskList = pxTemp; \
xNumOfOverflows += 1; \
xNumOfOverflows++; \
prvResetNextTaskUnblockTime(); \
} while( 0 )
@ -2021,7 +2021,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
* updated. */
taskENTER_CRITICAL();
{
uxCurrentNumberOfTasks += 1U;
uxCurrentNumberOfTasks++;
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;
/* Enforces ordering for ports and optimised compilers that may otherwise place
* the above increment elsewhere. */
@ -3964,7 +3964,7 @@ BaseType_t xTaskResumeAll( void )
* previous call to vTaskSuspendAll(). */
configASSERT( uxSchedulerSuspended != 0U );
uxSchedulerSuspended -= 1U;
--uxSchedulerSuspended;
portRELEASE_TASK_LOCK();
if( uxSchedulerSuspended == ( UBaseType_t ) 0U )
@ -4964,7 +4964,7 @@ BaseType_t xTaskIncrementTick( void )
}
else
{
xPendedTicks += 1U;
++xPendedTicks;
/* The tick hook gets called at regular intervals, even if the
* scheduler is locked. */