]> granicus.if.org Git - graphviz/commit
addFace: fix mismatch of calling convention in callback
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 7 Nov 2021 19:40:52 +0000 (11:40 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 10 Nov 2021 02:34:09 +0000 (18:34 -0800)
commitfce4aede14c7163c080940ab9d47c7e1b551a45e
tree6f5430c0a0948bc491c1caade2adacd1147a1c1e
parent675a80e566c3b64869fefaf1f1b12e6ac7833ba4
addFace: fix mismatch of calling convention in callback

The compiler said about this code:

  delaunay.c: In function ‘addFace’:
  delaunay.c:428:48: warning: cast between incompatible function types from
    ‘void (*)(GFace *, ninfo *)’ {aka ‘void (*)(struct <anonymous> *, struct
    <anonymous> *)’} to ‘gint (*)(void *, void *)’ {aka ‘int (*)(void *,
    void *)’} [-Wcast-function-type]
       gts_face_foreach_neighbor ((GtsFace*)f, 0, (GtsFunc) addNeighbor, &ni);
                                                  ^

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