scripts: coccinelle: Correct warning message
authorJulia Lawall <Julia.Lawall@lip6.fr>
Wed, 12 Dec 2018 11:55:57 +0000 (12:55 +0100)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sun, 16 Dec 2018 15:33:44 +0000 (00:33 +0900)
"Assignment" requires the assigned value before the place that
value is stored into.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
scripts/coccinelle/misc/boolinit.cocci

index 1b44feb7926c7563102b994a99b54cd4b955c525..b0584a33c921491026a01d019f8b77fc3e5fd151 100644 (file)
@@ -150,19 +150,19 @@ cocci.print_main("WARNING: Comparison to bool",p)
 p << r2.p;
 @@
 
-cocci.print_main("WARNING: Comparison of bool to 0/1",p)
+cocci.print_main("WARNING: Comparison of 0/1 to bool variable",p)
 
 @script:python depends on org@
 p1 << r3.p1;
 @@
 
-cocci.print_main("WARNING: Assignment of bool to 0/1",p1)
+cocci.print_main("WARNING: Assignment of 0/1 to bool variable",p1)
 
 @script:python depends on org@
 p2 << r4.p2;
 @@
 
-cocci.print_main("ERROR: Assignment of bool to non-0/1 constant",p2)
+cocci.print_main("ERROR: Assignment of non-0/1 constant to bool variable",p2)
 
 @script:python depends on report@
 p << r1.p;
@@ -174,16 +174,16 @@ coccilib.report.print_report(p[0],"WARNING: Comparison to bool")
 p << r2.p;
 @@
 
-coccilib.report.print_report(p[0],"WARNING: Comparison of bool to 0/1")
+coccilib.report.print_report(p[0],"WARNING: Comparison of 0/1 to bool variable")
 
 @script:python depends on report@
 p1 << r3.p1;
 @@
 
-coccilib.report.print_report(p1[0],"WARNING: Assignment of bool to 0/1")
+coccilib.report.print_report(p1[0],"WARNING: Assignment of 0/1 to bool variable")
 
 @script:python depends on report@
 p2 << r4.p2;
 @@
 
-coccilib.report.print_report(p2[0],"ERROR: Assignment of bool to non-0/1 constant")
+coccilib.report.print_report(p2[0],"ERROR: Assignment of non-0/1 constant to bool variable")