From 3d3df1808ef472c7c324ed3da87a2432c270d6dd Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Mon, 27 Jun 2022 18:44:18 -0700 Subject: [PATCH] growops: squash a -Wsign-conversion warning By construction, `newopn` can only ever be non-negative here. Though in the long term a more sweeping change should be done to count items in `size_t` variables pervasively. --- lib/pathplan/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pathplan/route.c b/lib/pathplan/route.c index 69bb776fd..e42306a1c 100644 --- a/lib/pathplan/route.c +++ b/lib/pathplan/route.c @@ -418,7 +418,7 @@ static int growops(int newopn) { if (newopn <= opn) return 0; - if (!(ops = realloc(ops, POINTSIZE * newopn))) { + if (!(ops = realloc(ops, POINTSIZE * (size_t)newopn))) { return -1; } opn = newopn; -- 2.40.0