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

scp.c compile warnings


Hi,

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)?

Thanks,

Vic



Follow-Ups:
Re: scp.c compile warnings"Jean-Philippe Garcia Ballester" <jeanphilippe.garciaballester@xxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org