diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2018-12-29 09:14:16 +0300 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-01-06 03:46:51 +0300 |
commit | c3003315fbf442d99a73a3fc5288dbf89a735e38 (patch) | |
tree | 42827d17daac0428a0ba1967fedf13742f36503b /scripts | |
parent | dc7884f34a5da79c61a9443c465a99512dc7bb15 (diff) | |
download | linux-c3003315fbf442d99a73a3fc5288dbf89a735e38.tar.xz |
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>
Diffstat (limited to 'scripts')
-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; @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; |