From: Matthew Fernandez Date: Sun, 2 May 2021 03:13:10 +0000 (-0700) Subject: avoid using double literals with a float variable X-Git-Tag: 2.47.2~7^2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4a17b6d69272d1bc3668df09d24da03a53041c21;p=graphviz avoid using double literals with a float variable With -Wfloat-conversion, the compiler warns that going via double literals like this resulted in an imprecise float. To squash this warning and be more precise, we can use float literals instead. --- diff --git a/lib/neatogen/constrained_majorization_ipsep.c b/lib/neatogen/constrained_majorization_ipsep.c index 8ff639640..e4c9f5288 100644 --- a/lib/neatogen/constrained_majorization_ipsep.c +++ b/lib/neatogen/constrained_majorization_ipsep.c @@ -214,8 +214,8 @@ int stress_majorization_cola(vtx_data * graph, /* Input graph in sparse represen if (j == 1 && i % 2 == 1) { v = maxEdgeLen; v *= v; - if (v > 0.01) { - v = 1.0 / v; + if (v > 0.01f) { + v = 1.0f / v; } } else v = 0;