Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MISRA C 2012 Rule 14.4 Violations. #975

Merged
merged 7 commits into from
Feb 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions tasks.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,17 +175,17 @@
/*-----------------------------------------------------------*/

#if ( configNUMBER_OF_CORES == 1 )
#define taskSELECT_HIGHEST_PRIORITY_TASK() \
do { \
UBaseType_t uxTopPriority = uxTopReadyPriority; \
\
/* Find the highest priority queue that contains ready tasks. */ \
while( listLIST_IS_EMPTY( &( pxReadyTasksLists[ uxTopPriority ] ) ) ) \
{ \
configASSERT( uxTopPriority ); \
--uxTopPriority; \
} \
\
#define taskSELECT_HIGHEST_PRIORITY_TASK() \
do { \
UBaseType_t uxTopPriority = uxTopReadyPriority; \
\
/* Find the highest priority queue that contains ready tasks. */ \
while( listLIST_IS_EMPTY( &( pxReadyTasksLists[ uxTopPriority ] ) ) != pdFALSE ) \
{ \
configASSERT( uxTopPriority ); \
--uxTopPriority; \
} \
\
/* listGET_OWNER_OF_NEXT_ENTRY indexes through the list, so the tasks of \
* the same priority get an equal share of the processor time. */ \
listGET_OWNER_OF_NEXT_ENTRY( pxCurrentTCB, &( pxReadyTasksLists[ uxTopPriority ] ) ); \
Expand Down Expand Up @@ -6570,7 +6570,7 @@
if( taskVALID_CORE_ID( xCoreID ) != pdFALSE )
{
#if ( configNUMBER_OF_CORES == 1 )
xReturn = pxCurrentTCB;

Check warning on line 6573 in tasks.c

View check run for this annotation

Codecov / codecov/patch

tasks.c#L6573

Added line #L6573 was not covered by tests
#else /* #if ( configNUMBER_OF_CORES == 1 ) */
xReturn = pxCurrentTCBs[ xCoreID ];
#endif /* #if ( configNUMBER_OF_CORES == 1 ) */
Expand Down
Loading