Skip to contentSkip to conversation

scripts/coccinelle/misc/boolinit.cocci: fix assignment warnings

PATCH In review Fabian Frederick 2 participants 2 messages Oct 10, 2014 Coccinelle/Semantic Patches (SmPL)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts/coccinelle/misc/boolinit.cocci: fix assignment warnings

Replace "Assignment of bool to 0/1" by "Assignment of 0/1 to bool"

---
 scripts/coccinelle/misc/boolinit.cocci | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
scripts/coccinelle/misc/boolinit.cocci +4 -4
index b9abed4..63c4562 100644
@@ -145,13 +145,13 @@ cocci.print_main("WARNING: Comparison of bool to 0/1",p)
 p1 << r3.p1;
 @@
 
-cocci.print_main("WARNING: Assignment of bool to 0/1",p1)
+cocci.print_main("WARNING: Assignment of 0/1 to bool",p1)
 
 @script:python depends on org@
 p2 << r3.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",p2)
 
 @script:python depends on report@
 p << r1.p;
@@ -169,10 +169,10 @@ coccilib.report.print_report(p[0],"WARNING: Comparison of bool to 0/1")
 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")
 
 @script:python depends on report@
 p2 << r3.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")
Signature · 1 line
1.9.3
Acked-by on v1 1/1
#1 lore raw

Thanks!

Quoted 45 lines · Fabian Frederick

Replace "Assignment of bool to 0/1" by "Assignment of 0/1 to bool"

---
 scripts/coccinelle/misc/boolinit.cocci | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
scripts/coccinelle/misc/boolinit.cocci +4 -5
index b9abed4..63c4562 100644
@@ -145,13 +145,13 @@ cocci.print_main("WARNING: Comparison of bool to 0/1",p)
 p1 << r3.p1;
 @@
 
-cocci.print_main("WARNING: Assignment of bool to 0/1",p1)
+cocci.print_main("WARNING: Assignment of 0/1 to bool",p1)
 
 @script:python depends on org@
 p2 << r3.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",p2)
 
 @script:python depends on report@
 p << r1.p;
@@ -169,10 +169,10 @@ coccilib.report.print_report(p[0],"WARNING: Comparison of bool to 0/1")
 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")
 
 @script:python depends on report@
 p2 << r3.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")
--

1.9.3