summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2018-12-28 15:49:01 +0100
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-01-06 09:46:51 +0900
commitdc7884f34a5da79c61a9443c465a99512dc7bb15 (patch)
tree7383b3dc08116199a253c6f5bfda4a83ebd69d7f /scripts
parenta5003571e627789d8104ebdbe3ae24be41ea071a (diff)
scripts: coccinelle: check for redeclaration
Avoid reporting on the use of an iterator index variable when the variable is redeclared. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/coccinelle/iterators/use_after_iter.cocci3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/coccinelle/iterators/use_after_iter.cocci b/scripts/coccinelle/iterators/use_after_iter.cocci
index ce8cc9c006e5..66a1140474c8 100644
--- a/scripts/coccinelle/iterators/use_after_iter.cocci
+++ b/scripts/coccinelle/iterators/use_after_iter.cocci
@@ -35,6 +35,7 @@ iterator name hlist_for_each_entry_from;
iterator name hlist_for_each_entry_safe;
statement S;
position p1,p2;
+type T;
@@
(
@@ -125,6 +126,8 @@ sizeof(<+...c...+>)
|
&c->member
|
+T c;
+|
c = E
|
*c@p2