From eaa2826d1282e3be9ea58ecc99e5e5485530be93 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 2 Nov 2022 19:34:57 -0700 Subject: [PATCH] smyrna: avoid inadvertent double promotion in 'renderSelectedNodes' MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Squashes two compiler warnings: topviewfuncs.c: In function ‘renderSelectedNodes’: topviewfuncs.c:283:41: warning: conversion from ‘double’ to ‘GLfloat’ {aka ‘float’} may change value [-Wfloat-conversion] 283 | glVertex3f(pos.x,pos.y,pos.z+0.001); | ~~~~~^~~~~~ topviewfuncs.c:285:50: warning: conversion from ‘double’ to ‘float’ may change value [-Wfloat-conversion] 285 | drawCircle(pos.x,pos.y,nodeSize,pos.z+0.001); | ~~~~~^~~~~~ --- cmd/smyrna/topviewfuncs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/smyrna/topviewfuncs.c b/cmd/smyrna/topviewfuncs.c index 23a9165de..75df1bf5b 100644 --- a/cmd/smyrna/topviewfuncs.c +++ b/cmd/smyrna/topviewfuncs.c @@ -280,9 +280,9 @@ static void renderSelectedNodes(Agraph_t * g) nodeSize = ND_size(v); if (defaultNodeShape == 0) - glVertex3f(pos.x,pos.y,pos.z+0.001); + glVertex3f(pos.x, pos.y, pos.z + 0.001f); else if (defaultNodeShape == 1) - drawCircle(pos.x,pos.y,nodeSize,pos.z+0.001); + drawCircle(pos.x, pos.y, nodeSize, pos.z + 0.001f); } if(defaultNodeShape==0) glEnd(); -- 2.40.0