Browse files

cleanups.

  • Loading branch information...
1 parent 86d1027 commit 394809c9f365aceb3019d57a5950aedbce8e081e @kjs kjs committed Jun 24, 2012
Showing with 3 additions and 9 deletions.
  1. +1 −1 src/gencode.c
  2. +0 −5 src/m1.y
  3. +2 −3 src/semcheck.c
View
2 src/gencode.c
@@ -162,7 +162,7 @@ unfreeze_registers(M1_compiler *comp, m1_symboltable *table) {
while (iter != NULL) {
/* if num elems == 1 take the typedecl's type, otherwise it's an array. */
m1_valuetype type = iter->num_elems == 1 ? iter->typedecl->valtype : VAL_INT;
- unsigned regno = iter->regno;
+ int regno = iter->regno;
if (regno != NO_REG_ALLOCATED_YET) {
assert(comp->registers[type][regno] == REG_SYMBOL);
View
5 src/m1.y
@@ -514,11 +514,6 @@ function_init : return_type TK_IDENT
$$ = chunk(comp, $1, $2, 0);
comp->currentchunk = $$;
- /* enter name of function declaration in table
- XXX is this still needed? Dont think so but leave it for now.
- */
- //sym_enter_chunk(comp, &comp->currentchunk->constants, $2);
-
/* enter name of this function in global symbol table, so
compiler can find it whenever another function calls this one.
View
5 src/semcheck.c
@@ -250,7 +250,7 @@ check_for(M1_compiler *comp, m1_forexpr *i, unsigned line) {
/* break and continue are allowed in for loops. */
if (i->init)
- check_expr(comp, i->init);
+ (void)check_expr(comp, i->init);
if (i->cond) {
m1_type *t = check_expr(comp, i->cond);
@@ -471,7 +471,6 @@ check_funcall(M1_compiler *comp, m1_funcall *f, unsigned line) {
}
else {
- assert(f->funsym->typedecl != NULL);
f->typedecl = f->funsym->typedecl;
}
@@ -491,7 +490,7 @@ static void
check_exprlist(M1_compiler *comp, m1_expression *expr) {
m1_expression *iter = expr;
while (iter != NULL) {
- check_expr(comp, iter);
+ (void)check_expr(comp, iter);
iter = iter->next;
}
}

0 comments on commit 394809c

Please sign in to comment.