From: Magnus Jacobsson Date: Sat, 7 Nov 2020 12:51:51 +0000 (+0100) Subject: Remove 2 -Wunused-but-set-variable warnings in ortho.c X-Git-Tag: 2.46.0~11^2~30 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1d31d022a5b16775d42390b85d17243b2a5ff679;p=graphviz Remove 2 -Wunused-but-set-variable warnings in ortho.c --- diff --git a/lib/ortho/ortho.c b/lib/ortho/ortho.c index 122119a55..b626446ec 100644 --- a/lib/ortho/ortho.c +++ b/lib/ortho/ortho.c @@ -454,25 +454,17 @@ addLoop (sgraph* sg, cell* cp, snode* dp, snode* sp) { int i; int onTop; - pointf midp = midPt (cp); for (i = 0; i < cp->nsides; i++) { - cell* ocp; - pointf p; - double wt; snode* onp = cp->sides[i]; if (onp->isVert) continue; if (onp->cells[0] == cp) { onTop = 1; - ocp = onp->cells[1]; } else { onTop = 0; - ocp = onp->cells[0]; } - p = sidePt (onp, ocp); - wt = fabs(p.x - midp.x) + fabs(p.y - midp.y); if (onTop) createSEdge (sg, sp, onp, 0); /* FIX weight */ else @@ -489,20 +481,10 @@ static void addNodeEdges (sgraph* sg, cell* cp, snode* np) { int i; - pointf midp = midPt (cp); for (i = 0; i < cp->nsides; i++) { snode* onp = cp->sides[i]; - cell* ocp; - pointf p; - double wt; - if (onp->cells[0] == cp) - ocp = onp->cells[1]; - else - ocp = onp->cells[0]; - p = sidePt (onp, ocp); - wt = fabs(p.x - midp.x) + fabs(p.y - midp.y); createSEdge (sg, np, onp, 0); /* FIX weight */ } sg->nnodes++;