The commit coccinelle/coccinelle@47bd4cae52 changed a behavior of
parsing right before coccinelle v1.1.0. With the commit, the current
scripts under scripts/coccinelle/ errors out with:
minus: parse error:
File ".../zephyr/scripts/coccinelle/deref_null.cocci",
line 25, column 42, charpos = 666
around = '...',
whole content = (E != NULL && ...) ? <+...E->f@p1...+> : ...
I've already raised an issue upstream coccinelle/coccinelle#257. But
Debian is already shipping v1.1.0 and we need a fix.
The proposed fix doesn't change the semantics, it just explicitly
states that the rule is an expression.
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
The following addition `depends on !(file in "ext")` allows
to exclude `ext/` warnings reported by coccinelle scripts.
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
This script finds cases of NULL dereferences where a variable
is dereferenced under a NULL test, even though it is known
to be NULL.
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>