From: Matthew Fernandez Date: Tue, 28 Jun 2022 01:42:29 +0000 (-0700) Subject: reallyroutespline: squash a -Wsign-conversion warning X-Git-Tag: 5.0.0~8^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=28ac1565fd6cf0b2dd7acdcb8d0bda0c0c88ddac;p=graphviz reallyroutespline: squash a -Wsign-conversion warning By construction, `inpn` 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. --- diff --git a/lib/pathplan/route.c b/lib/pathplan/route.c index 0274d4b2e..69bb776fd 100644 --- a/lib/pathplan/route.c +++ b/lib/pathplan/route.c @@ -105,7 +105,7 @@ static int reallyroutespline(Pedge_t * edges, int edgen, static int tnan; if (tnan < inpn) { - if (!(tnas = realloc(tnas, sizeof(tna_t) * inpn))) + if (!(tnas = realloc(tnas, sizeof(tna_t) * (size_t)inpn))) return -1; tnan = inpn; }