From: Matthew Fernandez Date: Mon, 26 Dec 2022 21:56:56 +0000 (-0800) Subject: expr print: squash a -Wconversion warning X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=233570748c89187e89d4a3aa07cacab4eba25f9f;p=graphviz expr print: squash a -Wconversion warning `integer` is known to fit into an `int` here. --- diff --git a/lib/expr/exeval.c b/lib/expr/exeval.c index ece5423fa..4ae981bf0 100644 --- a/lib/expr/exeval.c +++ b/lib/expr/exeval.c @@ -390,7 +390,7 @@ static int print(Expr_t *ex, Exnode_t *exnode, void *env, Sfio_t *sp) { v = eval(ex, exnode->data.print.descriptor, env); if (v.integer < 0 || (long long unsigned)v.integer >= elementsof(ex->file) || (!(sp = ex->file[v.integer]) && - !(sp = ex->file[v.integer] = sfnew(NULL, NULL, SF_UNBOUND, v.integer, SF_READ|SF_WRITE)))) + !(sp = ex->file[v.integer] = sfnew(NULL, NULL, SF_UNBOUND, (int)v.integer, SF_READ|SF_WRITE)))) { exerror("printf: %" PRIdMAX ": invalid descriptor", (intmax_t)v.integer); return -1;