shithub: plan9front

Download patch

ref: 1a09421f7db897e1d2e2a9210f79ca4389362c3a
parent: 21075859e4f3ed93ef2a8ae072cc23d575b4549c
author: Noam Preil <noam@pixelhero.dev>
date: Sun Jun 20 23:29:58 EDT 2021

kencc: clarify warning for unused assignments

--- a/sys/src/cmd/1c/reg.c	Sun Jun 20 22:12:58 2021
+++ b/sys/src/cmd/1c/reg.c	Sun Jun 20 23:29:58 2021
@@ -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	Sun Jun 20 22:12:58 2021
+++ b/sys/src/cmd/2c/reg.c	Sun Jun 20 23:29:58 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, "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	Sun Jun 20 22:12:58 2021
+++ b/sys/src/cmd/5c/reg.c	Sun Jun 20 23:29:58 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, "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	Sun Jun 20 22:12:58 2021
+++ b/sys/src/cmd/6c/reg.c	Sun Jun 20 23:29:58 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, "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	Sun Jun 20 22:12:58 2021
+++ b/sys/src/cmd/7c/reg.c	Sun Jun 20 23:29:58 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, "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	Sun Jun 20 22:12:58 2021
+++ b/sys/src/cmd/8c/reg.c	Sun Jun 20 23:29:58 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, "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	Sun Jun 20 22:12:58 2021
+++ b/sys/src/cmd/kc/reg.c	Sun Jun 20 23:29:58 2021
@@ -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	Sun Jun 20 22:12:58 2021
+++ b/sys/src/cmd/qc/reg.c	Sun Jun 20 23:29:58 2021
@@ -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	Sun Jun 20 22:12:58 2021
+++ b/sys/src/cmd/vc/reg.c	Sun Jun 20 23:29:58 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, "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++)