diff options
| author | Tyler Retzlaff <[email protected]> | 2024-02-29 13:32:05 -0800 |
|---|---|---|
| committer | David Marchand <[email protected]> | 2024-03-01 13:51:59 +0100 |
| commit | 5df34de5808a7b826b8bc035d6ee3161a12be364 (patch) | |
| tree | 778146b921468b324ae989decc3cc1d0c6ea4835 /devtools | |
| parent | 0f1dc8cb671203d52488fd66936f2fe6dcca03cc (diff) | |
devtools: forbid use of argument variadic pack extension
Prevent introduction of new use of args... and ##args compiler
extension.
Signed-off-by: Tyler Retzlaff <[email protected]>
Diffstat (limited to 'devtools')
| -rwxr-xr-x | devtools/checkpatches.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh index e379700897..c47ea59501 100755 --- a/devtools/checkpatches.sh +++ b/devtools/checkpatches.sh @@ -183,6 +183,14 @@ check_forbidden_additions() { # <patch> -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \ "$1" || res=1 + # forbid use of variadic argument pack extension in macros + awk -v FOLDERS="lib drivers app examples" \ + -v EXPRESSIONS='#[[:space:]]*define.*[^(,[:space:]]\\.\\.\\.[[:space:]]*)' \ + -v RET_ON_FAIL=1 \ + -v MESSAGE='Do not use variadic argument pack in macros' \ + -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \ + "$1" || res=1 + # forbid use of experimental build flag except in examples awk -v FOLDERS='lib drivers app' \ -v EXPRESSIONS='-DALLOW_EXPERIMENTAL_API allow_experimental_apis' \ |
