scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 0289c983456b286aea8fcf95c4a2e9950964317f
parent 511baa28dc19e114dc4ddb08c865e68cbfc8a624
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sat, 15 Nov 2014 13:22:56 -0500

Fix initializer warnings

tp variable was not used, and it was not returning anything.

Diffstat:
Mcc1/decl.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/cc1/decl.c b/cc1/decl.c @@ -234,8 +234,6 @@ invalid_type: static struct node * initializer(Symbol *sym) { - register Type *tp = sym->type; - if (!sym->s.isdefined) error("'%s' initialized and declared extern", sym->name); @@ -247,6 +245,7 @@ initializer(Symbol *sym) expr(); } while (accept(',')); } + return NULL; } /* TODO: bitfields */