From acde16465a318d118db6a4e742398af3b8d93952 Mon Sep 17 00:00:00 2001 From: Francisco Molina Date: Fri, 5 Nov 2021 08:38:56 +0100 Subject: [PATCH] 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. --- dist/tools/coccinelle/force/static.cocci | 25 ------------------------ 1 file changed, 25 deletions(-) delete mode 100644 dist/tools/coccinelle/force/static.cocci diff --git a/dist/tools/coccinelle/force/static.cocci b/dist/tools/coccinelle/force/static.cocci deleted file mode 100644 index 0e5ebd8fa6..0000000000 --- a/dist/tools/coccinelle/force/static.cocci +++ /dev/null @@ -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;