diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2018-12-29 01:14:16 -0500 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-01-05 19:46:51 -0500 |
commit | c3003315fbf442d99a73a3fc5288dbf89a735e38 (patch) | |
tree | 42827d17daac0428a0ba1967fedf13742f36503b | |
parent | dc7884f34a5da79c61a9443c465a99512dc7bb15 (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.cocci | 5 |
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@ |
137 | bool b; | 137 | bool b; |
138 | position p2; | 138 | position p2; |
139 | identifier i; | ||
139 | constant c != {0,1}; | 140 | constant 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@ |
144 | p << r1.p; | 149 | p << r1.p; |