Skip to content

Commit 0d03a93

Browse files
authored
Fic clang compiler warnings (#711)
Signed-off-by: Gaurav Aggarwal <[email protected]>
1 parent 71662b5 commit 0d03a93

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,12 @@ target_compile_options(freertos_kernel PRIVATE
262262
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Werror>
263263
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Weverything>
264264

265-
# TODO: Add in other Compilers here.
265+
# Suppressions required to build clean with clang.
266+
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-unused-macros>
267+
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-padded>
268+
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-missing-variable-declarations>
269+
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-covered-switch-default>
270+
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-cast-align>
266271
)
267272

268273

croutine.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@
4343

4444

4545
/* Lists for ready and blocked co-routines. --------------------*/
46-
static List_t pxReadyCoRoutineLists[ configMAX_CO_ROUTINE_PRIORITIES ]; /*< Prioritised ready co-routines. */
47-
static List_t xDelayedCoRoutineList1; /*< Delayed co-routines. */
48-
static List_t xDelayedCoRoutineList2; /*< Delayed co-routines (two lists are used - one for delays that have overflowed the current tick count. */
49-
static List_t * pxDelayedCoRoutineList = NULL; /*< Points to the delayed co-routine list currently being used. */
50-
static List_t * pxOverflowDelayedCoRoutineList = NULL; /*< Points to the delayed co-routine list currently being used to hold co-routines that have overflowed the current tick count. */
51-
static List_t xPendingReadyCoRoutineList; /*< Holds co-routines that have been readied by an external event. They cannot be added directly to the ready lists as the ready lists cannot be accessed by interrupts. */
46+
static List_t pxReadyCoRoutineLists[ configMAX_CO_ROUTINE_PRIORITIES ]; /**< Prioritised ready co-routines. */
47+
static List_t xDelayedCoRoutineList1; /**< Delayed co-routines. */
48+
static List_t xDelayedCoRoutineList2; /**< Delayed co-routines (two lists are used - one for delays that have overflowed the current tick count. */
49+
static List_t * pxDelayedCoRoutineList = NULL; /**< Points to the delayed co-routine list currently being used. */
50+
static List_t * pxOverflowDelayedCoRoutineList = NULL; /**< Points to the delayed co-routine list currently being used to hold co-routines that have overflowed the current tick count. */
51+
static List_t xPendingReadyCoRoutineList; /**< Holds co-routines that have been readied by an external event. They cannot be added directly to the ready lists as the ready lists cannot be accessed by interrupts. */
5252

5353
/* Other file private variables. --------------------------------*/
5454
CRCB_t * pxCurrentCoRoutine = NULL;

portable/ThirdParty/GCC/Posix/utils/wait_for_event.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
*
2727
*/
2828

29-
#ifndef _WAIT_FOR_EVENT_H_
30-
#define _WAIT_FOR_EVENT_H_
29+
#ifndef WAIT_FOR_EVENT_H_
30+
#define WAIT_FOR_EVENT_H_
3131

3232
#include <stdbool.h>
3333
#include <time.h>
@@ -43,4 +43,4 @@ void event_signal( struct event * ev );
4343

4444

4545

46-
#endif /* ifndef _WAIT_FOR_EVENT_H_ */
46+
#endif /* ifndef WAIT_FOR_EVENT_H_ */

0 commit comments

Comments
 (0)