From: Matthew Fernandez Date: Sun, 2 May 2021 03:38:36 +0000 (-0700) Subject: squash some -Wfloat-conversion warnings X-Git-Tag: 2.47.2~7^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f2726d0a6b91920aa429e15c5e6259554d0e9260;p=graphviz squash some -Wfloat-conversion warnings If we need -0.1 and -0.2 as floats (or the closest representation), we should just say so. This improves the compiler’s ability to understand the intent of this code. --- diff --git a/cmd/smyrna/topviewfuncs.c b/cmd/smyrna/topviewfuncs.c index 4ad51c97f..3c9207784 100644 --- a/cmd/smyrna/topviewfuncs.c +++ b/cmd/smyrna/topviewfuncs.c @@ -328,7 +328,7 @@ static void renderNodes(Agraph_t * g) x=parseXdotwithattrs(g); if (x) { - draw_xdot(x,-0.2); + draw_xdot(x,-0.2f); freeXDot (x); } for (v = agfstnode(g); v; v = agnxtnode(g, v)) @@ -336,7 +336,7 @@ static void renderNodes(Agraph_t * g) if(!object_color(v,&c)) continue; x=parseXdotwithattrs(v); - draw_xdot(x,-0.1); + draw_xdot(x,-0.1f); if(x) freeXDot (x); @@ -426,8 +426,8 @@ static void renderSelectedEdges(Agraph_t * g) glColor4f(1,0,0,1); posT = ED_posTail(e); posH = ED_posHead(e); - posT.z +=0.01; - posH.z +=0.01; + posT.z +=0.01f; + posH.z +=0.01f; draw_edge(&posT,&posH,getEdgeLength(e),0); } }