shithub: scc

Download patch

ref: 0d42a41545441b5c017742baf75863d843f0b451
parent: 08c868015e1f07dba3ed4b0c960e48a4a69ee7c6
author: Quentin Rameau <quinq@fifth.space>
date: Thu Jun 2 08:33:31 EDT 2016

[driver] clean up some unused variables

--- a/driver/posix/scc.c
+++ b/driver/posix/scc.c
@@ -35,9 +35,9 @@
 } tools[NR_TOOLS] = {
 	[CC1] = { .bin = "cc1", .cmd = PREFIX "/libexec/scc/", },
 	[CC2] = { .bin = "cc2", .cmd = PREFIX "/libexec/scc/", },
-	[QBE] = { .bin = "qbe", .bin = "qbe", .cmd = "qbe", },
-	[AS]  = { .bin = "cat", .bin = "cat", .cmd = "cat", },
-	[TEE] = { .bin = "tee", .bin = "tee", .cmd = "tee", },
+	[QBE] = { .bin = "qbe", .cmd = "qbe", },
+	[AS]  = { .bin = "cat", .cmd = "cat", },
+	[TEE] = { .bin = "tee", .cmd = "tee", },
 };
 
 char *argv0;
@@ -145,7 +145,7 @@
 build(char *file)
 {
 	int tool, out, keepfile;
-	static int in = NR_TOOLS, preout;
+	static int preout;
 
 	for (tool = CC1; tool < NR_TOOLS; tool = out) {
 		keepfile = 0;
@@ -152,7 +152,6 @@
 
 		switch (tool) {
 		case CC1:
-			in = NR_TOOLS;
 			out = Eflag ? NR_TOOLS : CC2;
 			if (!Eflag)
 				keepfile = kflag;
@@ -187,7 +186,6 @@
 		}
 
 		spawn(settool(inittool(tool), out));
-		in = tool;
 	}
 	for (i = 0; i < NR_TOOLS; ++i) {
 		if ((pid = tools[i].pid) == 0)