[Box Backup-dev] ASSERT

Martin Ebourne boxbackup-dev@fluffy.co.uk
Thu, 15 Dec 2005 10:47:25 +0000


Ben Summers <ben@fluffy.co.uk> wrote:
> On 15 Dec 2005, at 01:05, Martin Ebourne wrote:
>> This assert is false on x86_64:
>>
>> box_time_t GetCurrentBoxTime()
>> {
>> 	ASSERT(sizeof(uint32_t) == sizeof(time_t));
>> 	return SecondsToBoxTime((uint32_t)time(0));
>> }
>>
>> Are there any gotchas it is protecting? Just removing it looks  plausible
>> to me.
>
> You could remove it, but it is protecting against turning a 64 bit  
> time into a 32 bit one. It won't be a problem for a few more 
> decades...

box_time_t currently is 64 bit. Presumably SecondsToBoxTime ought to be 
fixed to take 64 bit, then there's no problem.

Cheers,

Martin.