mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
dist/tools/coccinelle/force: remove static.cocci
The rule is not behaving as it should and flagging all 'static' variables based only on initialization (if the variable is initialized before usage), but fails to recognize if 'static' is used to limit visibility.
This commit is contained in:
parent
9e853a6a79
commit
acde16465a
25
dist/tools/coccinelle/force/static.cocci
vendored
25
dist/tools/coccinelle/force/static.cocci
vendored
@ -1,25 +0,0 @@
|
||||
// remove unused static property of function-local static variable
|
||||
// (from Julia Lawall, see https://lists.riot-os.org/pipermail/devel/2017-May/005133.html)
|
||||
|
||||
@bad exists@
|
||||
position p;
|
||||
identifier x;
|
||||
type T;
|
||||
@@
|
||||
|
||||
static T x@p;
|
||||
...
|
||||
x = <+...x...+>
|
||||
|
||||
@@
|
||||
identifier x;
|
||||
expression e;
|
||||
type T;
|
||||
position p != bad.p;
|
||||
@@
|
||||
|
||||
-static
|
||||
T x@p;
|
||||
... when != x
|
||||
when strict
|
||||
?x = e;
|
Loading…
Reference in New Issue
Block a user