aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2018-12-29 01:14:16 -0500
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-01-05 19:46:51 -0500
commitc3003315fbf442d99a73a3fc5288dbf89a735e38 (patch)
tree42827d17daac0428a0ba1967fedf13742f36503b
parentdc7884f34a5da79c61a9443c465a99512dc7bb15 (diff)
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;
136@r4 depends on !patch@ 136@r4 depends on !patch@
137bool b; 137bool b;
138position p2; 138position p2;
139identifier i;
139constant c != {0,1}; 140constant c != {0,1};
140@@ 141@@
142(
143 b = i
144|
141*b@p2 = c 145*b@p2 = c
146)
142 147
143@script:python depends on org@ 148@script:python depends on org@
144p << r1.p; 149p << r1.p;