GCC11 throws the following warning:
graphviz/lib/pathplan/shortest.c:93:47: warning: argument 2 of type ‘Ppoint_t *’ {aka ‘struct Pxy_t *’} declared as a pointer [-Warray-parameter=]
93 | int Pshortestpath(Ppoly_t * polyp, Ppoint_t * eps, Ppolyline_t * output)
| ~~~~~~~~~~~^~~
In file included from graphviz/lib/pathplan/pathutil.h:15,
from graphviz/lib/pathplan/shortest.c:16:
graphviz/lib/pathplan/pathplan.h:22:59: note: previously declared as an array ‘Ppoint_t[2]’ {aka ‘struct Pxy_t[2]’}
22 | extern int Pshortestpath(Ppoly_t * boundary, Ppoint_t endpoints[2],
| ~~~~~~~~~^~~~~~~~~~~~
[2/20] Building C object lib/pathplan/CMakeFiles/pathplan.dir/route.c.o
graphviz/lib/pathplan/route.c:76:29: warning: argument 4 of type ‘Ppoint_t *’ {aka ‘struct Pxy_t *’} declared as a pointer [-Warray-parameter=]
76 | Ppoint_t * evs, Ppolyline_t * output)
| ~~~~~~~~~~~^~~
In file included from graphviz/lib/pathplan/pathutil.h:15,
from graphviz/lib/pathplan/route.c:17:
graphviz/lib/pathplan/pathplan.h:28:39: note: previously declared as an array ‘Pvector_t[2]’ {aka ‘struct Pxy_t[2]’}
28 | Pvector_t endpoint_slopes[2],
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~
* Return 0 on success and -1 on failure, including no memory.
*/
int Proutespline(Pedge_t * edges, int edgen, Ppolyline_t input,
- Ppoint_t * evs, Ppolyline_t * output)
+ Ppoint_t evs[2], Ppolyline_t * output)
{
Ppoint_t *inps;
int inpn;
* points supplied in eps. The resulting polyline is stored in output.
* Return 0 on success, -1 on bad input, -2 on memory allocation problem.
*/
-int Pshortestpath(Ppoly_t * polyp, Ppoint_t * eps, Ppolyline_t * output)
+int Pshortestpath(Ppoly_t * polyp, Ppoint_t eps[2], Ppolyline_t * output)
{
int pi, minpi;
double minx;