shithub: riscv

Download patch

ref: 1a09421f7db897e1d2e2a9210f79ca4389362c3a
parent: 21075859e4f3ed93ef2a8ae072cc23d575b4549c
author: Noam Preil <[email protected]>
date: Sun Jun 20 23:29:58 EDT 2021

kencc: clarify warning for unused assignments

--- a/sys/src/cmd/1c/reg.c
+++ b/sys/src/cmd/1c/reg.c
@@ -359,7 +359,7 @@
 			  ~(r->refahead.b[z] | r->calahead.b[z] | addrs.b[z]);
 		if(bany(&bit)) {
 			nearln = r->prog->lineno;
-			warn(Z, "set and not used: %B", bit);
+			warn(Z, "assignment not used: %B", bit);
 			if(debug['R'])
 				print("set an not used: %B\n", bit);
 			excise(r);
--- 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, "set and not used: %B", bit);
+			warn(Z, "assignment not used: %B", bit);
 			if(debug['R'])
-				print("set an not used: %B\n", bit);
+				print("assignment 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, "set and not used: %B", bit);
+			warn(Z, "assignment not used: %B", bit);
 			if(debug['R'])
-				print("set and not used: %B\n", bit);
+				print("assignment 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, "set and not used: %B", bit);
+			warn(Z, "assignment not used: %B", bit);
 			if(debug['R'])
-				print("set and not used: %B\n", bit);
+				print("assignment 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, "set and not used: %B", bit);
+			warn(Z, "assignment not used: %B", bit);
 			if(debug['R'])
-				print("set and not used: %B\n", bit);
+				print("assignment 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, "set and not used: %B", bit);
+			warn(Z, "assignment not used: %B", bit);
 			if(debug['R'])
-				print("set and not used: %B\n", bit);
+				print("assignment 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,7 +307,7 @@
 			  ~(r->refahead.b[z] | r->calahead.b[z] | addrs.b[z]);
 		if(bany(&bit)) {
 			nearln = r->prog->lineno;
-			warn(Z, "set and not used: %B", bit);
+			warn(Z, "assignment not used: %B", bit);
 			if(debug['R'])
 				print("set an not used: %B\n", bit);
 			excise(r);
--- a/sys/src/cmd/qc/reg.c
+++ b/sys/src/cmd/qc/reg.c
@@ -317,7 +317,7 @@
 			  ~(r->refahead.b[z] | r->calahead.b[z] | addrs.b[z]);
 		if(bany(&bit)) {
 			nearln = r->prog->lineno;
-			warn(Z, "set and not used: %B", bit);
+			warn(Z, "assignment not used: %B", bit);
 			if(debug['R'])
 				print("set an not used: %B\n", bit);
 			excise(r);
--- 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, "set and not used: %B", bit);
+			warn(Z, "assignment not used: %B", bit);
 			if(debug['R'])
-				print("set and not used: %B\n", bit);
+				print("assignment not used: %B\n", bit);
 			excise(r);
 		}
 		for(z=0; z<BITS; z++)