Fix MISRA violations for Kernel release V11.2.0 (#1251)

* Fix MISRA violations for Kernel release V11.2.0

* Fix formatting

* Remove redundant configASSERT in timers.c
This commit is contained in:
Rahul Kar 2025-02-28 17:10:08 +05:30 committed by GitHub
parent df0aa5a815
commit 3fd7f174db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 126 additions and 116 deletions

10
tasks.c
View file

@ -2016,7 +2016,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
pxNewTCB->xTaskRunState = taskTASK_NOT_RUNNING;
/* Is this an idle task? */
if( ( ( TaskFunction_t ) pxTaskCode == ( TaskFunction_t ) prvIdleTask ) || ( ( TaskFunction_t ) pxTaskCode == ( TaskFunction_t ) prvPassiveIdleTask ) )
if( ( ( TaskFunction_t ) pxTaskCode == ( TaskFunction_t ) ( &prvIdleTask ) ) || ( ( TaskFunction_t ) pxTaskCode == ( TaskFunction_t ) ( &prvPassiveIdleTask ) ) )
{
pxNewTCB->uxTaskAttributes |= taskATTRIBUTE_IS_IDLE;
}
@ -3573,7 +3573,7 @@ static BaseType_t prvCreateIdleTasks( void )
{
#if ( configNUMBER_OF_CORES == 1 )
{
pxIdleTaskFunction = prvIdleTask;
pxIdleTaskFunction = &prvIdleTask;
}
#else /* #if ( configNUMBER_OF_CORES == 1 ) */
{
@ -3582,11 +3582,11 @@ static BaseType_t prvCreateIdleTasks( void )
* run when no other task is available to run. */
if( xCoreID == 0 )
{
pxIdleTaskFunction = prvIdleTask;
pxIdleTaskFunction = &prvIdleTask;
}
else
{
pxIdleTaskFunction = prvPassiveIdleTask;
pxIdleTaskFunction = &prvPassiveIdleTask;
}
}
#endif /* #if ( configNUMBER_OF_CORES == 1 ) */
@ -3603,7 +3603,7 @@ static BaseType_t prvCreateIdleTasks( void )
* name will contain an incorrect ASCII character. This is
* acceptable as the task name is used mainly for debugging. */
cIdleName[ xIdleTaskNameIndex ] = ( char ) ( xCoreID + '0' );
cIdleName[ xIdleTaskNameIndex + 1 ] = '\0';
cIdleName[ xIdleTaskNameIndex + 1U ] = '\0';
}
#endif /* if ( configNUMBER_OF_CORES > 1 ) */