aboutsummaryrefslogtreecommitdiff
path: root/libssh
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-05-13 07:38:30 +0000
committerAndreas Schneider <mail@cynapses.org>2009-05-13 07:38:30 +0000
commit439d995fedde3719097adf6d7650c205ac922f24 (patch)
tree946617b452504668bb2d930195259e4c6b7d85b7 /libssh
parent2e0b2e2e913ea25adb56ab5c593ba45ce956f868 (diff)
downloadlibssh-439d995fedde3719097adf6d7650c205ac922f24.tar.gz
libssh-439d995fedde3719097adf6d7650c205ac922f24.tar.xz
libssh-439d995fedde3719097adf6d7650c205ac922f24.zip
Fix some compiler warnings on windows.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@764 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh')
-rw-r--r--libssh/channels.c11
-rw-r--r--libssh/packet.c4
2 files changed, 8 insertions, 7 deletions
diff --git a/libssh/channels.c b/libssh/channels.c
index fe439f08..3239d106 100644
--- a/libssh/channels.c
+++ b/libssh/channels.c
@@ -163,8 +163,8 @@ static int channel_open(CHANNEL *channel, const char *type_c, int window,
if (channel->local_channel != ntohl(tmp)) {
ssh_set_error(session, SSH_FATAL,
- "Server answered with sender channel number %d instead of given %d",
- ntohl(tmp),
+ "Server answered with sender channel number %lu instead of given %u",
+ (long unsigned int) ntohl(tmp),
channel->local_channel);
leave_function();
return -1;
@@ -208,9 +208,9 @@ static int channel_open(CHANNEL *channel, const char *type_c, int window,
}
ssh_set_error(session, SSH_REQUEST_DENIED,
- "Channel opening failure: channel %d error (%d) %s",
+ "Channel opening failure: channel %u error (%lu) %s",
channel->local_channel,
- ntohl(code),
+ (long unsigned int) ntohl(code),
error);
SAFE_FREE(error);
@@ -295,7 +295,8 @@ static CHANNEL *channel_from_msg(SSH_SESSION *session) {
channel = ssh_channel_from_local(session, ntohl(chan));
if (channel == NULL) {
ssh_set_error(session, SSH_FATAL,
- "Server specified invalid channel %d", ntohl(chan));
+ "Server specified invalid channel %lu",
+ (long unsigned int) ntohl(chan));
}
return channel;
diff --git a/libssh/packet.c b/libssh/packet.c
index c9a1a50d..3c54236f 100644
--- a/libssh/packet.c
+++ b/libssh/packet.c
@@ -466,8 +466,8 @@ static int packet_send2(SSH_SESSION *session) {
finallen = htonl(currentlen + padding + 1);
ssh_log(session, SSH_LOG_RARE,
- "%d bytes after comp + %d padding bytes = %d bytes packet",
- currentlen, padding, (ntohl(finallen)));
+ "%d bytes after comp + %d padding bytes = %lu bytes packet",
+ currentlen, padding, (long unsigned int) ntohl(finallen));
if (buffer_prepend_data(session->out_buffer, &padding, sizeof(u8)) < 0) {
goto error;