From 5fe463b40c779db020fd3ef1d1a494fe6a0149c2 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 15 Sep 2021 20:49:30 -0700 Subject: [PATCH] expr scan: use a 'size_t' for iteration Squashes a -Wsign-compare warning. --- lib/expr/excc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/expr/excc.c b/lib/expr/excc.c index f7c5ee56c..e6ab0ab20 100644 --- a/lib/expr/excc.c +++ b/lib/expr/excc.c @@ -22,6 +22,7 @@ Exccdisc_t* ccdisc; /* excc() discipline */ #include +#include #include #include @@ -140,7 +141,6 @@ static void scan(Excc_t* cc, Exnode_t* expr) { Print_t* x; - int i; if ((x = expr->data.print.args)) { @@ -152,7 +152,7 @@ scan(Excc_t* cc, Exnode_t* expr) { if (x->arg) { - for (i = 0; i < elementsof(x->param) && x->param[i]; i++) + for (size_t i = 0; i < elementsof(x->param) && x->param[i]; i++) { sfprintf(cc->ccdisc->text, ", &("); gen(cc, x->param[i]); -- 2.40.0