shithub: scc

Download patch

ref: 245fc40cffc3b201f5cdf9e1b485fc7fa06e1463
parent: 8c00d7841c469a78680766b398ea4766b1ac0a09
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Tue Jan 19 05:24:35 EST 2016

Remove unused parameter in initializer()

--- a/cc1/cc1.h
+++ b/cc1/cc1.h
@@ -384,7 +384,7 @@
 extern bool cmpnode(Node *np, TUINT val);
 
 /* init.c */
-extern void initializer(Symbol *sym, Type *tp, int nelem);
+extern void initializer(Symbol *sym, Type *tp);
 
 /* cpp.c */
 extern void icpp(void);
--- a/cc1/decl.c
+++ b/cc1/decl.c
@@ -792,7 +792,7 @@
 	if (sym->token == IDEN && sym->type->op != FTN)
 		emit(ODECL, sym);
 	if (accept('='))
-		initializer(sym, sym->type, -1);
+		initializer(sym, sym->type);
 	if (!(sym->flags & (ISGLOBAL|ISEXTERN)) && tp->op != FTN)
 		sym->flags |= ISDEFINED;
 	return sym;
--- a/cc1/init.c
+++ b/cc1/init.c
@@ -235,7 +235,7 @@
 }
 
 void
-initializer(Symbol *sym, Type *tp, int nelem)
+initializer(Symbol *sym, Type *tp)
 {
 	Node *np;
 	int flags = sym->flags;