summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2018-12-29 07:14:16 +0100
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-01-06 09:46:51 +0900
commitc3003315fbf442d99a73a3fc5288dbf89a735e38 (patch)
tree42827d17daac0428a0ba1967fedf13742f36503b
parentdc7884f34a5da79c61a9443c465a99512dc7bb15 (diff)
downloadtalos-obmc-linux-c3003315fbf442d99a73a3fc5288dbf89a735e38.tar.gz
talos-obmc-linux-c3003315fbf442d99a73a3fc5288dbf89a735e38.zip
scripts: coccinelle: boolinit: drop warnings on named constants
Coccinelle doesn't always have access to the values of named (#define) constants, and they may likely often be bound to true and false values anyway, resulting in false positives. So stop warning about them. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
-rw-r--r--scripts/coccinelle/misc/boolinit.cocci5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/coccinelle/misc/boolinit.cocci b/scripts/coccinelle/misc/boolinit.cocci
index b0584a33c921..aabb581fab5c 100644
--- a/scripts/coccinelle/misc/boolinit.cocci
+++ b/scripts/coccinelle/misc/boolinit.cocci
@@ -136,9 +136,14 @@ position p1;
@r4 depends on !patch@
bool b;
position p2;
+identifier i;
constant c != {0,1};
@@
+(
+ b = i
+|
*b@p2 = c
+)
@script:python depends on org@
p << r1.p;
OpenPOWER on IntegriCloud