mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-25 22:35:42 +00:00
feat(libc): add support for fallthrough statement
Modern C compilers warn about unannotated switch/case fallthrough code, and require either a comment with some magic words, or an explicit compiler attribute. Since some TF-A static analysis CI check suggests having a "fallthrough;" statement instead of a comment, introduce a macro that implements that statement, and emits the proper compiler attribute. Change-Id: Ib34e615fb48d0f4a340aabfad4472e08d5c70248 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
This commit is contained in:
parent
6437a09a2d
commit
023f1bed1d
1 changed files with 1 additions and 0 deletions
|
@ -15,6 +15,7 @@
|
|||
#define __maybe_unused __attribute__((__unused__))
|
||||
#define __aligned(x) __attribute__((__aligned__(x)))
|
||||
#define __section(x) __attribute__((__section__(x)))
|
||||
#define __fallthrough __attribute__((__fallthrough__))
|
||||
#if RECLAIM_INIT_CODE
|
||||
/*
|
||||
* Add each function to a section that is unique so the functions can still
|
||||
|
|
Loading…
Add table
Reference in a new issue