1 // SPDX-License-Identifier: GPL-2.0-only 1 // SPDX-License-Identifier: GPL-2.0-only 2 /// The address of a variable or field is like 2 /// The address of a variable or field is likely always to be non-zero. 3 /// 3 /// 4 // Confidence: High 4 // Confidence: High 5 // Copyright: (C) 2012 Julia Lawall, INRIA/LIP 5 // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. 6 // Copyright: (C) 2012 Gilles Muller, INRIA/Li 6 // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. 7 // URL: https://coccinelle.gitlabpages.inria.f 7 // URL: https://coccinelle.gitlabpages.inria.fr/website 8 // Comments: 8 // Comments: 9 // Options: --no-includes --include-headers 9 // Options: --no-includes --include-headers 10 10 11 virtual org 11 virtual org 12 virtual report 12 virtual report 13 virtual context 13 virtual context 14 14 15 @r@ 15 @r@ 16 expression x; 16 expression x; 17 position p; 17 position p; 18 @@ 18 @@ 19 19 20 *\(&x@p == NULL \| &x@p != NULL\) 20 *\(&x@p == NULL \| &x@p != NULL\) 21 21 22 @script:python depends on org@ 22 @script:python depends on org@ 23 p << r.p; 23 p << r.p; 24 @@ 24 @@ 25 25 26 cocci.print_main("test of a variable/field add 26 cocci.print_main("test of a variable/field address",p) 27 27 28 @script:python depends on report@ 28 @script:python depends on report@ 29 p << r.p; 29 p << r.p; 30 @@ 30 @@ 31 31 32 msg = "ERROR: test of a variable/field address 32 msg = "ERROR: test of a variable/field address" 33 coccilib.report.print_report(p[0],msg) 33 coccilib.report.print_report(p[0],msg)
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.