shithub: plan9front

Download patch

ref: 4fd09def0fc51d0606e677f1ab59ad695d1cd780
parent: 759aafa007c42dce044800863455ad6048ed0ba5
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Jun 26 09:16:36 EDT 2021

kencc: revert back to "set but not used"

The change to "assignment not used" breaks symmetry with
"used and not set" and removes the reference to the
specific warning mentioned in /sys/doc/comp.ms.

Also, the patch was half-assed as that it left some typos
in like "used an not set", which this change also fixed.

--- a/sys/src/cmd/1c/reg.c	Fri Jun 25 19:10:07 2021
+++ b/sys/src/cmd/1c/reg.c	Sat Jun 26 09:16:36 2021
@@ -359,9 +359,9 @@
 			  ~(r->refahead.b[z] | r->calahead.b[z] | addrs.b[z]);
 		if(bany(&bit)) {
 			nearln = r->prog->lineno;
-			warn(Z, "assignment not used: %B", bit);
+			warn(Z, "set and not used: %B", bit);
 			if(debug['R'])
-				print("set an not used: %B\n", bit);
+				print("set and not used: %B\n", bit);
 			excise(r);
 		}
 		for(z=0; z<BITS; z++)
--- a/sys/src/cmd/2c/reg.c	Fri Jun 25 19:10:07 2021
+++ b/sys/src/cmd/2c/reg.c	Sat Jun 26 09:16:36 2021
@@ -359,9 +359,9 @@
 			  ~(r->refahead.b[z] | r->calahead.b[z] | addrs.b[z]);
 		if(bany(&bit)) {
 			nearln = r->prog->lineno;
-			warn(Z, "assignment not used: %B", bit);
+			warn(Z, "set and not used: %B", bit);
 			if(debug['R'])
-				print("assignment not used: %B\n", bit);
+				print("set and not used: %B\n", bit);
 			excise(r);
 		}
 		for(z=0; z<BITS; z++)
--- a/sys/src/cmd/5c/reg.c	Fri Jun 25 19:10:07 2021
+++ b/sys/src/cmd/5c/reg.c	Sat Jun 26 09:16:36 2021
@@ -329,9 +329,9 @@
 			  ~(r->refahead.b[z] | r->calahead.b[z] | addrs.b[z]);
 		if(bany(&bit)) {
 			nearln = r->prog->lineno;
-			warn(Z, "assignment not used: %B", bit);
+			warn(Z, "set and not used: %B", bit);
 			if(debug['R'])
-				print("assignment not used: %B\n", bit);
+				print("set and not used: %B\n", bit);
 			excise(r);
 		}
 		for(z=0; z<BITS; z++)
--- a/sys/src/cmd/6c/reg.c	Fri Jun 25 19:10:07 2021
+++ b/sys/src/cmd/6c/reg.c	Sat Jun 26 09:16:36 2021
@@ -520,9 +520,9 @@
 			  ~(r->refahead.b[z] | r->calahead.b[z] | addrs.b[z]);
 		if(bany(&bit)) {
 			nearln = r->prog->lineno;
-			warn(Z, "assignment not used: %B", bit);
+			warn(Z, "set and not used: %B", bit);
 			if(debug['R'])
-				print("assignment not used: %B\n", bit);
+				print("set and not used: %B\n", bit);
 			excise(r);
 		}
 		for(z=0; z<BITS; z++)
--- a/sys/src/cmd/7c/reg.c	Fri Jun 25 19:10:07 2021
+++ b/sys/src/cmd/7c/reg.c	Sat Jun 26 09:16:36 2021
@@ -324,9 +324,9 @@
 			  ~(r->refahead.b[z] | r->calahead.b[z] | addrs.b[z]);
 		if(bany(&bit)) {
 			nearln = r->prog->lineno;
-			warn(Z, "assignment not used: %B", bit);
+			warn(Z, "set and not used: %B", bit);
 			if(debug['R'])
-				print("assignment not used: %B\n", bit);
+				print("set and not used: %B\n", bit);
 			excise(r);
 		}
 		for(z=0; z<BITS; z++)
--- a/sys/src/cmd/8c/reg.c	Fri Jun 25 19:10:07 2021
+++ b/sys/src/cmd/8c/reg.c	Sat Jun 26 09:16:36 2021
@@ -451,9 +451,9 @@
 			  ~(r->refahead.b[z] | r->calahead.b[z] | addrs.b[z]);
 		if(bany(&bit)) {
 			nearln = r->prog->lineno;
-			warn(Z, "assignment not used: %B", bit);
+			warn(Z, "set and not used: %B", bit);
 			if(debug['R'])
-				print("assignment not used: %B\n", bit);
+				print("set and not used: %B\n", bit);
 			excise(r);
 		}
 		for(z=0; z<BITS; z++)
--- a/sys/src/cmd/kc/reg.c	Fri Jun 25 19:10:07 2021
+++ b/sys/src/cmd/kc/reg.c	Sat Jun 26 09:16:36 2021
@@ -307,9 +307,9 @@
 			  ~(r->refahead.b[z] | r->calahead.b[z] | addrs.b[z]);
 		if(bany(&bit)) {
 			nearln = r->prog->lineno;
-			warn(Z, "assignment not used: %B", bit);
+			warn(Z, "set and not used: %B", bit);
 			if(debug['R'])
-				print("set an not used: %B\n", bit);
+				print("set and not used: %B\n", bit);
 			excise(r);
 		}
 		for(z=0; z<BITS; z++)
--- a/sys/src/cmd/qc/reg.c	Fri Jun 25 19:10:07 2021
+++ b/sys/src/cmd/qc/reg.c	Sat Jun 26 09:16:36 2021
@@ -317,9 +317,9 @@
 			  ~(r->refahead.b[z] | r->calahead.b[z] | addrs.b[z]);
 		if(bany(&bit)) {
 			nearln = r->prog->lineno;
-			warn(Z, "assignment not used: %B", bit);
+			warn(Z, "set and not used: %B", bit);
 			if(debug['R'])
-				print("set an not used: %B\n", bit);
+				print("set and not used: %B\n", bit);
 			excise(r);
 		}
 		for(z=0; z<BITS; z++)
--- a/sys/src/cmd/vc/reg.c	Fri Jun 25 19:10:07 2021
+++ b/sys/src/cmd/vc/reg.c	Sat Jun 26 09:16:36 2021
@@ -319,9 +319,9 @@
 			  ~(r->refahead.b[z] | r->calahead.b[z] | addrs.b[z]);
 		if(bany(&bit)) {
 			nearln = r->prog->lineno;
-			warn(Z, "assignment not used: %B", bit);
+			warn(Z, "set and not used: %B", bit);
 			if(debug['R'])
-				print("assignment not used: %B\n", bit);
+				print("set and not used: %B\n", bit);
 			excise(r);
 		}
 		for(z=0; z<BITS; z++)