From: Matthew Fernandez Date: Sat, 30 Jul 2022 16:56:42 +0000 (-0700) Subject: pathplan Pobspath: squash a -Wconversion warning X-Git-Tag: 5.0.1~21^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0430a1cd08853dd70ec00cd7f06186998016f0d3;p=graphviz pathplan Pobspath: squash a -Wconversion warning Here again the proper solution would be to make the struct’s field also a `size_t` but once again it is part of the public API that we would like to avoid breaking. --- diff --git a/lib/pathplan/cvt.c b/lib/pathplan/cvt.c index e7e7022d4..00cb3f035 100644 --- a/lib/pathplan/cvt.c +++ b/lib/pathplan/cvt.c @@ -148,7 +148,8 @@ int Pobspath(vconfig_t * config, Ppoint_t p0, int poly0, Ppoint_t p1, free(ptvis0); free(ptvis1); - output_route->pn = opn; + assert(opn <= INT_MAX); + output_route->pn = (int)opn; output_route->ps = ops; #ifdef GASP gasp_print_polyline(output_route);