git: 9front

Download patch

ref: 7f3cb2a9c5b740dc86c4ac4e3d4cb45bb2e69dac
parent: 892a8f2fda1d6f7c689a8a1e3d07082ccace014f
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
+++ b/sys/src/cmd/1c/reg.c
@@ -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
+++ b/sys/src/cmd/2c/reg.c
@@ -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
+++ b/sys/src/cmd/5c/reg.c
@@ -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
+++ b/sys/src/cmd/6c/reg.c
@@ -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
+++ b/sys/src/cmd/7c/reg.c
@@ -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
+++ b/sys/src/cmd/8c/reg.c
@@ -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
+++ b/sys/src/cmd/kc/reg.c
@@ -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
+++ b/sys/src/cmd/qc/reg.c
@@ -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
+++ b/sys/src/cmd/vc/reg.c
@@ -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++)
--