From e7a387585992a9378ba2f2319c2408c62a0b14e8 Mon Sep 17 00:00:00 2001 From: Emil Skoeldberg Date: Thu, 26 Apr 2018 18:11:55 +0100 Subject: Fix compiler warnings. Compiler warned about comparison between signed and unsigned values. --- fold.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fold.c') diff --git a/fold.c b/fold.c index c2375df..8fc64c5 100644 --- a/fold.c +++ b/fold.c @@ -221,7 +221,7 @@ fold(Fn *fn) for (p=b->phi; p; p=p->link) visitphi(p, n, fn); if (b->visit == 0) { - for (i=b->ins; i-b->ins < b->nins; i++) + for (i=b->ins; i<&b->ins[b->nins]; i++) visitins(i, fn); visitjmp(b, n, fn); } @@ -289,7 +289,7 @@ fold(Fn *fn) renref(&p->arg[a]); pp = &p->link; } - for (i=b->ins; i-b->ins < b->nins; i++) + for (i=b->ins; i<&b->ins[b->nins]; i++) if (renref(&i->to)) *i = (Ins){.op = Onop}; else -- cgit 1.4.1