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

Re: libssh2 master 81912f6 cast away a warning.

From: Alexander Lamaison <swish_at_lammy.co.uk>
Date: Mon, 7 Jun 2010 00:36:04 +0100

On 3 June 2010 04:19, <libssh2_at_git.stuge.se> wrote:
> - Log -----------------------------------------------------------------
> commit 81912f67e73a37082ffd9200a2ebae9fd40dd711
> Author: Guenter Knauf <lists_at_gknw.net>
> Commit: Guenter Knauf <lists_at_gknw.net>
>
>    cast away a warning.
>
> diff --git a/src/keepalive.c b/src/keepalive.c
> index 34f226f..7ac7c0f 100644
> --- a/src/keepalive.c
> +++ b/src/keepalive.c
> @@ -89,7 +89,7 @@ libssh2_keepalive_send (LIBSSH2_SESSION *session,
>         if (seconds_to_next)
>             *seconds_to_next = session->keepalive_interval;
>     } else if (seconds_to_next) {
> -        *seconds_to_next = session->keepalive_last_sent
> +        *seconds_to_next = (int) session->keepalive_last_sent
>             + session->keepalive_interval - now;
>     }

Why is this cast safe?

Alex

--
http://www.swish-sftp.org - Easy SFTP for Windows
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-06-07