[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scp.c compile warnings


On Tuesday 18 August 2009 15:04:58 Vic Lee wrote:
> Hi,

  Hello,

> I got the following warning:
> 
> [ 70%] Building C object libssh/CMakeFiles/ssh_shared.dir/scp.c.o
> /home/vic/git/libssh/libssh/scp.c: In function ‘ssh_scp_init’:
> /home/vic/git/libssh/libssh/scp.c:78: warning: implicit declaration of
> function ‘snprintf’
> /home/vic/git/libssh/libssh/scp.c:78: warning: incompatible implicit
> declaration of built-in function ‘snprintf’
> /home/vic/git/libssh/libssh/scp.c: In function ‘ssh_scp_push_file’:
> /home/vic/git/libssh/libssh/scp.c:139: warning: incompatible implicit
> declaration of built-in function ‘snprintf’
> /home/vic/git/libssh/libssh/scp.c:139: warning: format ‘%ld’ expects
> type ‘long int’, but argument 5 has type ‘size_t’
> 
> The first one can be fixed by #include <stdio.h>, but I am not sure
> about a portable way to fix the second one. Maybe just cast to (long
> int)?

  Isn't %zd portable ?

-- 
Jean-Philippe Garcia Ballester - Core Software Developer - 
SmartJog | Phone: +33 1 5868 6233 | Fax: +33 1 5868 6255 | Mob: +33 6 3178 4048 | www.smartjog.com
27 Blvd Hippolyte Marquès, 94200 Ivry-sur-Seine, France
A TDF Group company

Attachment: signature.asc
Description: This is a digitally signed message part.


Follow-Ups:
Re: scp.c compile warningsKeisial <keisial@xxxxxxxxx>
References:
scp.c compile warningsVic Lee <llyzs@xxxxxxx>
Archive administrator: postmaster@lists.cynapses.org