Skip to content

Commit

Permalink
scripts: coccinelle: check for redeclaration
Browse files Browse the repository at this point in the history
Avoid reporting on the use of an iterator index variable when
the variable is redeclared.

Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
  • Loading branch information
JuliaLawall authored and masahir0y committed Jan 6, 2019
1 parent a500357 commit dc7884f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/coccinelle/iterators/use_after_iter.cocci
Original file line number Diff line number Diff line change
Expand Up @@ -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;
@@

(
Expand Down Expand Up @@ -125,6 +126,8 @@ sizeof(<+...c...+>)
|
&c->member
|
T c;
|
c = E
|
*c@p2
Expand Down

0 comments on commit dc7884f

Please sign in to comment.