diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2018-12-28 15:49:01 +0100 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-01-06 09:46:51 +0900 |
commit | dc7884f34a5da79c61a9443c465a99512dc7bb15 (patch) | |
tree | 7383b3dc08116199a253c6f5bfda4a83ebd69d7f /scripts | |
parent | a5003571e627789d8104ebdbe3ae24be41ea071a (diff) | |
download | linux-dc7884f34a5da79c61a9443c465a99512dc7bb15.tar.bz2 |
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.cocci | 3 |
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 |