| .. | |||||
| boolinit.cocci | |||||
| cstptr.cocci | |||||
| doubleinit.cocci | |||||
| ifaddr.cocci | |||||
| ifcol.cocci | |||||
| irqf_oneshot.cocci | |||||
| memcpy-assign.cocci | |||||
| noderef.cocci | |||||
| orplus.cocci | |||||
| semicolon.cocci | |||||
| warn.cocci |
| Server IP : 103.169.32.36 / Your IP : 216.73.216.202 Web Server : Apache System : Linux web.dpmptsp 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : apache ( 48) PHP Version : 5.6.40 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/lib/modules/3.10.0-1160.119.1.el7.x86_64/build/scripts/coccinelle/misc/ |
Upload File : |
/// Check for constants that are added but are used elsewhere as bitmasks
/// The results should be checked manually to ensure that the nonzero
/// bits in the two constants are actually disjoint.
///
// Confidence: Moderate
// Copyright: (C) 2013 Julia Lawall, INRIA/LIP6. GPLv2.
// Copyright: (C) 2013 Gilles Muller, INRIA/LIP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers
virtual org
virtual report
virtual context
@r@
constant c;
identifier i;
expression e;
@@
(
e | c@i
|
e & c@i
|
e |= c@i
|
e &= c@i
)
@s@
constant r.c,c1;
identifier i1;
position p;
@@
(
c1 + c - 1
|
*c1@i1 +@p c
)
@script:python depends on org@
p << s.p;
@@
cocci.print_main("sum of probable bitmasks, consider |",p)
@script:python depends on report@
p << s.p;
@@
msg = "WARNING: sum of probable bitmasks, consider |"
coccilib.report.print_report(p[0],msg)
| .. | |||||
| boolinit.cocci | |||||
| cstptr.cocci | |||||
| doubleinit.cocci | |||||
| ifaddr.cocci | |||||
| ifcol.cocci | |||||
| irqf_oneshot.cocci | |||||
| memcpy-assign.cocci | |||||
| noderef.cocci | |||||
| orplus.cocci | |||||
| semicolon.cocci | |||||
| warn.cocci |