1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-12-02 01:17:52 +03:00

Fix build warnings.

git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@273 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
Andreas Schneider
2009-03-14 15:14:18 +00:00
parent 453b91903b
commit 08e2408896
5 changed files with 17 additions and 10 deletions

View File

@@ -113,9 +113,9 @@ static int channel_open(CHANNEL *channel,char *type_c,int window,
channel->local_channel, channel->local_channel,
channel->remote_channel); channel->remote_channel);
ssh_log(session, SSH_LOG_PROTOCOL, ssh_log(session, SSH_LOG_PROTOCOL,
"Remote window : %ld, maxpacket : %ld", "Remote window : %lu, maxpacket : %lu",
channel->remote_window, (long unsigned int) channel->remote_window,
channel->remote_maxpacket); (long unsigned int) channel->remote_maxpacket);
channel->open=1; channel->open=1;
leave_function(); leave_function();
return 0; return 0;

View File

@@ -39,7 +39,10 @@ u32 packet_decrypt_len(SSH_SESSION *session, char *crypted){
if(session->current_crypto) if(session->current_crypto)
packet_decrypt(session,crypted,session->current_crypto->in_cipher->blocksize); packet_decrypt(session,crypted,session->current_crypto->in_cipher->blocksize);
memcpy(&decrypted,crypted,sizeof(decrypted)); memcpy(&decrypted,crypted,sizeof(decrypted));
ssh_log(session,SSH_LOG_PACKET,"packet size decrypted : %d (0x%lx)",ntohl(decrypted),ntohl(decrypted)); ssh_log(session, SSH_LOG_PACKET,
"Packet size decrypted: %lu (0x%lx)",
(long unsigned int) ntohl(decrypted),
(long unsigned int) ntohl(decrypted));
return ntohl(decrypted); return ntohl(decrypted);
} }

View File

@@ -455,9 +455,12 @@ int ssh_get_kex1(SSH_SESSION *session){
supported_ciphers_mask=ntohl(supported_ciphers_mask); supported_ciphers_mask=ntohl(supported_ciphers_mask);
supported_authentications_mask=ntohl(supported_authentications_mask); supported_authentications_mask=ntohl(supported_authentications_mask);
ssh_log(session,SSH_LOG_PROTOCOL,"server bits: %d ; host bits: %d Protocol flags : %.8lx ; " ssh_log(session,SSH_LOG_PROTOCOL,"server bits: %d ; host bits: %d Protocol flags : %.8lx ; "
"cipher mask : %.8lx ; auth mask: %.8lx",server_bits, "cipher mask : %.8lx ; auth mask: %.8lx",
host_bits,protocol_flags,supported_ciphers_mask, server_bits,
supported_authentications_mask); host_bits,
(unsigned long int) protocol_flags,
(unsigned long int) supported_ciphers_mask,
(unsigned long int) supported_authentications_mask);
serverkey=make_rsa1_string(server_exp,server_mod); serverkey=make_rsa1_string(server_exp,server_mod);
hostkey=make_rsa1_string(host_exp,host_mod); hostkey=make_rsa1_string(host_exp,host_mod);
build_session_id1(session,server_mod,host_mod); build_session_id1(session,server_mod,host_mod);

View File

@@ -325,7 +325,7 @@ static int packet_send2(SSH_SESSION *session){
unsigned int blocksize=(session->current_crypto?session->current_crypto->out_cipher->blocksize:8); unsigned int blocksize=(session->current_crypto?session->current_crypto->out_cipher->blocksize:8);
enter_function(); enter_function();
ssh_log(session, SSH_LOG_RARE, ssh_log(session, SSH_LOG_RARE,
"Writing on the wire a packet having %ld bytes before", currentlen); "Writing on the wire a packet having %u bytes before", currentlen);
#ifdef HAVE_LIBZ #ifdef HAVE_LIBZ
if(session->current_crypto && session->current_crypto->do_compress_out){ if(session->current_crypto && session->current_crypto->do_compress_out){
ssh_log(session, SSH_LOG_RARE, "Compressing in_buffer ..."); ssh_log(session, SSH_LOG_RARE, "Compressing in_buffer ...");

View File

@@ -642,12 +642,13 @@ static SFTP_ATTRIBUTES *sftp_parse_attr_3(SFTP_SESSION *sftp, BUFFER *buf,
break; break;
flags=ntohl(flags); flags=ntohl(flags);
attr->flags=flags; attr->flags=flags;
ssh_log(sftp->session, SSH_LOG_RARE, "Flags: %.8lx\n", flags); ssh_log(sftp->session, SSH_LOG_RARE,
"Flags: %.8lx\n", (long unsigned int) flags);
if(flags & SSH_FILEXFER_ATTR_SIZE){ if(flags & SSH_FILEXFER_ATTR_SIZE){
if(buffer_get_u64(buf,&attr->size)!=sizeof(u64)) if(buffer_get_u64(buf,&attr->size)!=sizeof(u64))
break; break;
attr->size=ntohll(attr->size); attr->size=ntohll(attr->size);
ssh_log(sftp->session, SSH_LOG_RARE, "Size: %lld\n", attr->size); ssh_log(sftp->session, SSH_LOG_RARE, "Size: %lu\n", attr->size);
} }
if(flags & SSH_FILEXFER_ATTR_UIDGID){ if(flags & SSH_FILEXFER_ATTR_UIDGID){
if(buffer_get_u32(buf,&attr->uid)!=sizeof(u32)) if(buffer_get_u32(buf,&attr->uid)!=sizeof(u32))