Linux Audio

Check our new training course

Loading...
v4.17
 
 1/// The address of a variable or field is likely always to be non-zero.
 2///
 3// Confidence: High
 4// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6.  GPLv2.
 5// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6.  GPLv2.
 6// URL: http://coccinelle.lip6.fr/
 7// Comments:
 8// Options: --no-includes --include-headers
 9
10virtual org
11virtual report
12virtual context
13
14@r@
15expression x;
16statement S1,S2;
17position p;
18@@
19
20*if@p (&x)
21 S1 else S2
22
23@script:python depends on org@
24p << r.p;
25@@
26
27cocci.print_main("test of a variable/field address",p)
28
29@script:python depends on report@
30p << r.p;
31@@
32
33msg = "ERROR: test of a variable/field address"
34coccilib.report.print_report(p[0],msg)
v5.9
 1// SPDX-License-Identifier: GPL-2.0-only
 2/// The address of a variable or field is likely always to be non-zero.
 3///
 4// Confidence: High
 5// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6.
 6// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6.
 7// URL: http://coccinelle.lip6.fr/
 8// Comments:
 9// Options: --no-includes --include-headers
10
11virtual org
12virtual report
13virtual context
14
15@r@
16expression x;
17statement S1,S2;
18position p;
19@@
20
21*if@p (&x)
22 S1 else S2
23
24@script:python depends on org@
25p << r.p;
26@@
27
28cocci.print_main("test of a variable/field address",p)
29
30@script:python depends on report@
31p << r.p;
32@@
33
34msg = "ERROR: test of a variable/field address"
35coccilib.report.print_report(p[0],msg)