Subject: Re: libssh2 master 81912f6 cast away a warning.

Re: libssh2 master 81912f6 cast away a warning.

From: Guenter <>
Date: Mon, 07 Jun 2010 04:31:16 +0200

Am 07.06.2010 03:23, schrieb Alexander Lamaison:
> On 7 June 2010 02:17, Guenter<> wrote:
>> Hi,
>> Am 07.06.2010 01:36, schrieb Alexander Lamaison:
>>> Why is this cast safe?
>> please explain your concerns.
> Casting away warnings concerns me in general. Perhaps this cast is
> safe but if so, the reason is not obvious and should be explained.
> After all, warnings exist for a reason.
true in general. In this case the warning exists because seconds_to_next
is an int while now is time_t which might be unsigned int, or whatever -
but on a 32-bit system both int and time_t are 32-bit, thus even when
time_t is 64-bit on a 64-bit system we can cast to int until year 2038,
after that date we might consider something better ... :)


Received on 2010-06-07