[master] edb0ca986 Teach coccinelle our favourite macros
Nils Goroll
nils.goroll at uplex.de
Mon Feb 1 17:10:08 UTC 2021
commit edb0ca9863431dc8ccc6c37e779c179fc29f53cf
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Mon Feb 1 18:00:25 2021 +0100
Teach coccinelle our favourite macros
It seems they do not parse attributes and how I read
--macro-file-builtins they just define them to NIL.
diff --git a/tools/coccinelle/README.rst b/tools/coccinelle/README.rst
index bf01fc8e3..0c9c06d9e 100644
--- a/tools/coccinelle/README.rst
+++ b/tools/coccinelle/README.rst
@@ -6,6 +6,8 @@ for both the in-tree code style or out-of-tree VMOD and VUT development.
Unless noted otherwise, all patches should work when invoked as::
- spatch -I include/ -I bin/varnishd/ --dir . --in-place --sp-file $COCCI
+ spatch --macro-file tools/coccinelle/vdef.h \
+ -I include/ -I bin/varnishd/ --dir . --in-place \
+ --sp-file $COCCI
.. _coccinelle: http://coccinelle.lip6.fr/
diff --git a/tools/coccinelle/vdef.h b/tools/coccinelle/vdef.h
new file mode 100644
index 000000000..3cd515d79
--- /dev/null
+++ b/tools/coccinelle/vdef.h
@@ -0,0 +1,6 @@
+#define v_printflike_(f,a)
+#define v_deprecated_
+#define v_dont_optimize
+#define v_matchproto_(xxx)
+#define v_statevariable_(varname)
+#define v_unused_
More information about the varnish-commit
mailing list