float-equal warnings

trv-n at comcast.net trv-n at comcast.net
Mon Apr 10 00:57:10 UTC 2017


In ntp_refclock.c function refclock_control near line 920 a test for a
nonzero value is made with the time1 and time2 fudges, which raises
float-equal warnings.

One way to fix this is to compare against DBL_MIN, but float.h would
need to be included.

Comparing against LOGTOD(-31) will fail for any value less than ~0.2ns
(the minimum l_fp fraction).

Comparing against S_PER_NS will fail for values less than 1ns.

I was going to submit a patch with LOGTOD() since it doesn't seem like
a user would bother to put a fudge smaller than that, but I thought
I'd ask first.


More information about the devel mailing list