From 6dd4d48fd5803c9febcb51849fb64c1835dc9320 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 18 Jul 2021 17:43:23 -0700 Subject: [PATCH] bbOf: use size_t for string length Squashes a -Wsign-conversion warning. --- lib/gvpr/compile.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/gvpr/compile.c b/lib/gvpr/compile.c index 5c0d93840..9d0034bc4 100644 --- a/lib/gvpr/compile.c +++ b/lib/gvpr/compile.c @@ -118,13 +118,12 @@ static char *bbOf(Expr_t * pgm, char *pt, bool getll) double x, y, u, v; char *s; char *p; - int len; if (sscanf(pt, "%lf,%lf,%lf,%lf", &x, &y, &u, &v) == 4) { p = strchr(pt, ','); p = strchr(p + 1, ','); if (getll) { - len = p - pt; + size_t len = (size_t)(p - pt); s = exstralloc(pgm, len + 1); strncpy(s, pt, len); s[len] = '\0'; -- 2.40.0