Re: [chrony-dev] [PATCH] Fix rounding in UTI_DoubleToTimeval()

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


> On 23/07/2015, at 11:59 pm, Miroslav Lichvar <mlichvar@xxxxxxxxxx> wrote:
> 
> 
>> Just one query - I get a lot of compiler warnings from assigning long to the time_t fields and other places that have assumed long is 32 bit. For now I'm just ignoring but these conversion warnings are potential issues. It'd be a pretty big patch to fix them all but I think it should be done at some point
> 
> Yeah, that casting to long should be probably removed and I actually
> thought about doing that everywhere in util.c when I saw your patch.
> 
> Please feel free to submit a patch for that too.
> 
> Does Mac OS X have 32-bit time_t and 64-bit long? Or it's the other
> way around?

64 bit long, 32 bit time_t.
It would be better to cast to time_t but I'm not sure how portable that would be.

-- 
Bryan Christianson




--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/