Coccinelle: reduce rule applicability
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sat, 30 Jan 2016 15:27:04 +0000 (16:27 +0100)
committerMichal Marek <mmarek@suse.com>
Thu, 18 Feb 2016 21:05:30 +0000 (22:05 +0100)
Rule r is only use in org or report mode, so only execute it in those
cases.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Michal Marek <mmarek@suse.com>
scripts/coccinelle/misc/badty.cocci

index 2fc06fc..481cf30 100644 (file)
@@ -50,7 +50,7 @@ T **x;
 //  For org and report mode
 //----------------------------------------------------------
 
-@r disable sizeof_type_expr@
+@r depends on (org || report) disable sizeof_type_expr@
 type T;
 T **x;
 position p;