diff options
| author | WormHeamer | 2025-10-27 23:33:21 -0400 |
|---|---|---|
| committer | WormHeamer | 2025-10-27 23:33:21 -0400 |
| commit | 40d164972423056e8302bd67db9494b6e4b076b3 (patch) | |
| tree | 25ff78ade2fcef01cee7339037a0ae745c416d2b /main.c | |
| parent | dd62801133cddca25d94c9c59f8ca7d0748850c6 (diff) | |
fix a bunch of warnings
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -340,7 +340,7 @@ void parse_args_list(Lexer *l, Proc *proc) { Node *find_return(Node *n) { if (n->op == N_RETURN) return n; - for (int i = 0; i < n->out.len; i++) { + for (u32 i = 0; i < n->out.len; i++) { Node *r = find_return(OUT(n, i)); if (r) return r; } @@ -353,7 +353,7 @@ void proc_opt_fwd(Proc *p, Lexer *l, Node *n) { n->walked = 2; switch (n->op) { case N_START: - for (int i = 0; i < n->out.len; i++) { + for (u32 i = 0; i < n->out.len; i++) { proc_opt_fwd(p, l, OUT(n, i)); } break; @@ -361,7 +361,7 @@ void proc_opt_fwd(Proc *p, Lexer *l, Node *n) { if (n->out.len < 2) { //lex_error_at(l, n->src_pos, LE_ERROR, S("not all codepaths return")); } - for (int i = 0; i < n->out.len; i++) { + for (u32 i = 0; i < n->out.len; i++) { Node *r = find_return(OUT(n, i)); if (!r) { lex_error_at(l, OUT(n, i)->src_pos, LE_ERROR, S("not all codepaths return")); @@ -387,7 +387,7 @@ void proc_opt_fwd(Proc *p, Lexer *l, Node *n) { proc_opt_fwd(p, l, new_ctrl); return; } - for (int i = 0; i < n->out.len; i++) { + for (u32 i = 0; i < n->out.len; i++) { if (OUT(n, i)->op != N_PHI) { proc_opt_fwd(p, l, OUT(n, i)); } @@ -405,7 +405,7 @@ void proc_opt(Proc *p, Lexer *l) { lex_error(l, LE_ERROR, str_fmt(&p->scratch, "no return statement in function expecting %S", type_desc(&p->ret_type, &p->scratch))); } } - for (int i = 0; i < g->start->out.len; i++) { + for (u32 i = 0; i < g->start->out.len; i++) { Node *n = OUT(g->start, i); if (n->op == N_LIT && n->out.len < 1) { node_kill(n, g); @@ -622,12 +622,12 @@ void node_print(Node *n, Proc *p) { printf("\t%d [label=\"%s\", shape=record]", n->id, node_type_name(n->op)); } printf("\n"); - for (int i = 0; i < n->out.len; i++) { + for (u32 i = 0; i < n->out.len; i++) { Node *o = OUT(n, i); if (o->op == N_LIT) { printf("\t%d -> %d [style=dashed]\n", n->id, o->id); } else { - int j; + u32 j; for (j = 0; j < o->in.len && IN(o, j) != n; j++); if (j == 0) { printf("\t%d -> %d [color=red,headlabel=%d]\n", n->id, o->id, j); @@ -636,7 +636,7 @@ void node_print(Node *n, Proc *p) { } } } - for (int i = 0; i < n->out.len; i++) { + for (u32 i = 0; i < n->out.len; i++) { node_print(OUT(n, i), p); } } |
