Prevent introduction of new use of args... and ##args compiler
extension.
Signed-off-by: Tyler Retzlaff <[email protected]>
---
devtools/checkpatches.sh | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index e379700..811655b 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -61,6 +61,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
+
# no output on stdout or stderr
awk -v FOLDERS="lib drivers" \
-v EXPRESSIONS="\\\<printf\\\> \\\<fprintf\\\(stdout,
\\\<fprintf\\\(stderr," \
--
1.8.3.1