From: Matthew Fernandez Date: Sat, 13 Nov 2021 03:26:31 +0000 (-0800) Subject: bcomps getName: use size_t for buffer lengths X-Git-Tag: 2.50.0~26^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=339106408b2d903a34dff2e19e42c4ef1b226ef1;p=graphviz bcomps getName: use size_t for buffer lengths Squashes some -Wconversion warnings. --- diff --git a/cmd/tools/bcomps.c b/cmd/tools/bcomps.c index 52461a29e..2648fd004 100644 --- a/cmd/tools/bcomps.c +++ b/cmd/tools/bcomps.c @@ -112,13 +112,12 @@ static char *getName(int ng, int nb) { char *name; static char *buf; - int sz; if ((ng == 0) && (nb == 0)) name = outfile; else { if (!buf) { - sz = strlen(outfile) + 100; /* enough to handle '__' */ + size_t sz = strlen(outfile) + 100; // enough to handle '__' buf = malloc(sz); } if (suffix) {