]> granicus.if.org Git - graphviz/commit
delaunay_triangulation: fix mismatch of calling convention in callback
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 7 Nov 2021 19:25:21 +0000 (11:25 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 10 Nov 2021 02:34:09 +0000 (18:34 -0800)
commit675a80e566c3b64869fefaf1f1b12e6ac7833ba4
tree986fe1d2a8cc4c4e2eefb53587cda8135bba90cb
parent13a514216ad6408f185a17c3c568f967d27d7daa
delaunay_triangulation: fix mismatch of calling convention in callback

The compiler said about this code:

  delaunay.c:286:34: warning: cast between incompatible function types from
    ‘void (*)(GtsSegment *, v_data *)’ {aka ‘void (*)(struct _GtsSegment *,
    struct <anonymous> *)’} to ‘gint (*)(void *, void *)’ {aka
    ‘int (*)(void *, void *)’} [-Wcast-function-type]
       gts_surface_foreach_edge (s, (GtsFunc) add_edge, delaunay);
                                    ^

Similar to the prior commit, this was relying on a coincident return value of 0
from the callback function.
lib/neatogen/delaunay.c