lfpinit() signed or unsigned?

Gary E. Miller gem at rellim.com
Thu Mar 9 19:55:45 UTC 2017


Yo Eric!

On Thu, 9 Mar 2017 14:35:20 -0500
"Eric S. Raymond" <esr at thyrsus.com> wrote:

> Gary E. Miller <gem at rellim.com>:
> > It gets worse.  Looks like l_fp needs to be int64_t, not uint64_t.
> > Sometimes l_fp's are subtracted to get an offset.  
> 
> It doesn't matter.  All those calculations are casted to within an
> inch of their lives. :-)

Yeah, I see that.

> > And weird things happen in lfp_intv_to_tspec() to guess if l_fp is
> > unsigned or signed...  
> 
> Yes, they do.  I inherited that logic.

Then you're not offended when I change it.

My goal is to fix all -Wsign-conversion warnings.  Right now I see a lot
of bad casts.  I don't like bad casts.
 
> Be very, very careful about changing any of this stuff. I got it to
> where it is by a series of provably behavior-preserving steps from
> the old code. The corner cases are tricky.

I assume you are happy with the tests?  Anythiong you would like tested
better first?

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20170309/46693ecd/attachment.bin>


More information about the devel mailing list