From: Julia Lawall Date: Fri, 28 Dec 2018 14:49:01 +0000 (+0100) Subject: scripts: coccinelle: check for redeclaration X-Git-Tag: microblaze-v5.1-rc1~2^2~14 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=dc7884f34a5da79c61a9443c465a99512dc7bb15;p=linux-2.6-microblaze.git 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 Signed-off-by: Masahiro Yamada --- 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