Re: [chrony-dev] [PATCH] Fix rounding in UTI_DoubleToTimeval() |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [chrony-dev] [PATCH] Fix rounding in UTI_DoubleToTimeval()
- From: Bryan Christianson <bryan@xxxxxxxxxxxxx>
- Date: Fri, 24 Jul 2015 00:05:20 +1200
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smtpcorp.com; s=a0-2; h=Feedback-ID:X-Smtpcorp-Track:To:Message-Id:Date: From:Subject; bh=+9QLQq5CPAEgbjcIC5G94aEWsO7gK4w+3gm/9/PuaDs=; b=RpGUC8syhNw4 4A3pv5A30B01jfButbB3w5n1AYh/rK3nR93zLyEAjEGZTQ4TGbQ3stB7Tnq74N3NiCB3gJ1SnmClz 9lxwx4Br0f5N6JZRTwlCHtMrwVji/fOTiLzW/8DzyCHIY2qxrVYM+82zRtBoJXaP9eIFcPLSGDL7x wVKRklghscYnTsXs4R/IIUXzWbzkn8Occzkj7vB93iEthTO8HmW2PsCUctGiftDUBlXAKHiyyrHPp vKdPCnTUIFkVqvYv4DutTeMRY5YHJA+vKn5hWJqavE8YgGFMfZ0hM92AEhY7Jg/b3m9dOkMbxbkTH /t783Ux7VhdjUeOuuNvQEQ==;
- Feedback-id: 149811m:149811acx33YQ:149811sghliHTmUl:SMTPCORP
> 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.