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. --- copy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'copy.c') diff --git a/copy.c b/copy.c index 55c31b2..4432986 100644 --- a/copy.c +++ b/copy.c @@ -121,7 +121,7 @@ copy(Fn *fn) for (b=fn->start; b; b=b->link) { for (p=b->phi; p; p=p->link) visitphi(p, cp, &pw); - for (i=b->ins; i-b->ins < b->nins; i++) + for (i=b->ins; i<&b->ins[b->nins]; i++) visitins(i, cp, &pw, fn); } while ((w1=w)) { @@ -155,7 +155,7 @@ copy(Fn *fn) subst(&p->arg[a], cp); pp=&p->link; } - for (i=b->ins; i-b->ins < b->nins; i++) { + for (i=b->ins; i<&b->ins[b->nins]; i++) { r = copyof(i->to, cp); if (!req(r, i->to)) { *i = (Ins){.op = Onop}; -- cgit 1.4.1