Skip to content

Commit d222e43

Browse files
committed
Fixing more extra-semi-stmt clang warnings.
1 parent 5a1dd35 commit d222e43

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

include/stack_macros.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
#if ( ( configCHECK_FOR_STACK_OVERFLOW > 1 ) && ( portSTACK_GROWTH < 0 ) )
8888

8989
#define taskCHECK_FOR_STACK_OVERFLOW() \
90-
{ \
90+
do { \
9191
const uint32_t * const pulStack = ( uint32_t * ) pxCurrentTCB->pxStack; \
9292
const uint32_t ulCheckValue = ( uint32_t ) 0xa5a5a5a5; \
9393
\
@@ -98,7 +98,7 @@
9898
{ \
9999
vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName ); \
100100
} \
101-
}
101+
} while(0)
102102

103103
#endif /* #if( configCHECK_FOR_STACK_OVERFLOW > 1 ) */
104104
/*-----------------------------------------------------------*/

tasks.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,27 +170,27 @@
170170
/*-----------------------------------------------------------*/
171171

172172
#define taskSELECT_HIGHEST_PRIORITY_TASK() \
173-
{ \
173+
do { \
174174
UBaseType_t uxTopPriority; \
175175
\
176176
/* Find the highest priority list that contains ready tasks. */ \
177177
portGET_HIGHEST_PRIORITY( uxTopPriority, uxTopReadyPriority ); \
178178
configASSERT( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ uxTopPriority ] ) ) > 0 ); \
179179
listGET_OWNER_OF_NEXT_ENTRY( pxCurrentTCB, &( pxReadyTasksLists[ uxTopPriority ] ) ); \
180-
} /* taskSELECT_HIGHEST_PRIORITY_TASK() */
180+
} while(0)
181181

182182
/*-----------------------------------------------------------*/
183183

184184
/* A port optimised version is provided, call it only if the TCB being reset
185185
* is being referenced from a ready list. If it is referenced from a delayed
186186
* or suspended list then it won't be in a ready list. */
187187
#define taskRESET_READY_PRIORITY( uxPriority ) \
188-
{ \
188+
do { \
189189
if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ ( uxPriority ) ] ) ) == ( UBaseType_t ) 0 ) \
190190
{ \
191191
portRESET_READY_PRIORITY( ( uxPriority ), ( uxTopReadyPriority ) ); \
192192
} \
193-
}
193+
} while(0)
194194

195195
#endif /* configUSE_PORT_OPTIMISED_TASK_SELECTION */
196196

0 commit comments

Comments
 (0)