From: Matthew Fernandez Date: Mon, 26 Dec 2022 21:35:34 +0000 (-0800) Subject: ortho emitGraph: do float rounding in 'fprintf' X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f0e187dcb4524774da96d983930d3e4c8978694f;p=graphviz ortho emitGraph: do float rounding in 'fprintf' Squashes four -Wfloat-conversion warnings. --- diff --git a/lib/ortho/ortho.c b/lib/ortho/ortho.c index 263cc1bb2..db1554e3f 100644 --- a/lib/ortho/ortho.c +++ b/lib/ortho/ortho.c @@ -1411,7 +1411,7 @@ static char* prolog2 = static char* epilog2 = "showpage\n\ %%%%Trailer\n\ -%%%%BoundingBox: %d %d %d %d\n"; +%%%%BoundingBox: %.f %.f %.f %.f\n"; static point coordOf (cell* cp, snode* np) @@ -1536,7 +1536,6 @@ static DEBUG_FN void emitSearchGraph(FILE *fp, sgraph *sg) { static DEBUG_FN void emitGraph(FILE *fp, maze *mp, size_t n_edges, route *route_list, epair_t es[]) { boxf bb, absbb; - box bbox; absbb.LL.x = absbb.LL.y = MAXDOUBLE; absbb.UR.x = absbb.UR.y = -MAXDOUBLE; @@ -1564,6 +1563,7 @@ static DEBUG_FN void emitGraph(FILE *fp, maze *mp, size_t n_edges, absbb.UR.y = MAX(absbb.UR.y, bb.UR.y); } + boxf bbox; bbox.LL.x = absbb.LL.x + TRANS; bbox.LL.y = absbb.LL.y + TRANS; bbox.UR.x = absbb.UR.x + TRANS;