From ccd52940d06fc6ba06f44f7ea64f056529c0beb0 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Mon, 29 Apr 2019 16:12:41 +0200 Subject: coccinelle: further restrict certain transformations Some transformations generate results we don't want to keep, so let's disable such transformations for specific files. Also, disable const-strlen.cocci everywhere, as the STRLEN macro has a pretty limited scope, so the transformation generates false positives in most cases. --- coccinelle/const-strlen.disabled | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 coccinelle/const-strlen.disabled (limited to 'coccinelle/const-strlen.disabled') diff --git a/coccinelle/const-strlen.disabled b/coccinelle/const-strlen.disabled new file mode 100644 index 0000000000..30a6e5a88e --- /dev/null +++ b/coccinelle/const-strlen.disabled @@ -0,0 +1,14 @@ +@@ +constant s; +@@ +( +#define STRLEN +& +- sizeof(s)-1 ++ STRLEN(s) +) +@@ +constant s; +@@ +- strlen(s) ++ STRLEN(s) -- cgit v1.2.1