Skip to content

Commit 2b32e47

Browse files
yashinashif
authored andcommitted
scripts: coccinelle: Fix parse error
The commit coccinelle/coccinelle@47bd4cae522 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 <[email protected]>
1 parent 962d6b1 commit 2b32e47

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/coccinelle/deref_null.cocci

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ virtual report
1616

1717
// The following two rules are separate, because both can match a single
1818
// expression in different ways
19-
@pr1 depends on !(file in "ext")@
19+
@pr1 depends on !(file in "ext") expression@
2020
expression E;
2121
identifier f;
2222
position p1;
@@ -212,7 +212,7 @@ else S3
212212
// The following three rules are duplicates of ifm, pr1 and pr2 respectively.
213213
// It is need because the previous rule as already made a "change".
214214

215-
@pr11 depends on context && !org && !report && !(file in "ext") && pr1@
215+
@pr11 depends on context && !org && !report && !(file in "ext") && pr1 expression@
216216
expression E;
217217
identifier f;
218218
position p1;

0 commit comments

Comments
 (0)