This seems to be a false positive, but to figure this out requires non-trivial
reasoning about the control flow in this function. We may as well remove the
need to think about this. This squashes these warnings:
neatosplines.c: In function ‘makeObstacle’:
neatosplines.c:360:37: warning: ‘margin.y’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
360 | ymargin = -margin.y;
| ~~~~~~~~^~~~~~~~~~~
neatosplines.c:351:37: warning: ‘margin.x’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
351 | xmargin = -margin.x;
| ~~~~~~~~^~~~~~~~~~~
pointf* verts = NULL;
pointf vs[4];
pointf p;
- pointf margin;
+ pointf margin = {0};
switch (shapeOf(n)) {
case SH_POLY:
isPoly = true;
sides = 4;
verts = vs;
- margin.x = margin.y = 0;
/* For fixedshape, we can't use the width and height, as this includes
* the label. We only want to use the actual node shape.
*/