From f2726d0a6b91920aa429e15c5e6259554d0e9260 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 1 May 2021 20:38:36 -0700 Subject: [PATCH] squash some -Wfloat-conversion warnings MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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. --- cmd/smyrna/topviewfuncs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); } } -- 2.40.0