From 71f06fab915f20d10b4b97d6c927087228b51f6e Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Thu, 29 Nov 2012 22:33:04 +0100 Subject: Trivial 64-bit warning fixes. --- src/security/sasl/SASLSocket.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/security/sasl/SASLSocket.cpp') diff --git a/src/security/sasl/SASLSocket.cpp b/src/security/sasl/SASLSocket.cpp index 531e4188..c3498d22 100644 --- a/src/security/sasl/SASLSocket.cpp +++ b/src/security/sasl/SASLSocket.cpp @@ -83,7 +83,7 @@ SASLSocket::size_type SASLSocket::getBlockSize() const void SASLSocket::receive(string& buffer) { - const int n = receiveRaw(m_recvBuffer, sizeof(m_recvBuffer)); + const size_type n = receiveRaw(m_recvBuffer, sizeof(m_recvBuffer)); buffer = string(m_recvBuffer, n); } @@ -93,7 +93,7 @@ SASLSocket::size_type SASLSocket::receiveRaw(char* buffer, const size_type count { if (m_pendingLen != 0) { - const int copyLen = + const size_type copyLen = (count >= m_pendingLen ? m_pendingLen : count); std::copy(m_pendingBuffer + m_pendingPos, @@ -115,10 +115,10 @@ SASLSocket::size_type SASLSocket::receiveRaw(char* buffer, const size_type count return copyLen; } - const int n = m_wrapped->receiveRaw(buffer, count); + const size_type n = m_wrapped->receiveRaw(buffer, count); byte_t* output = 0; - int outputLen = 0; + long outputLen = 0; m_session->getMechanism()->decode (m_session, reinterpret_cast (buffer), n, @@ -156,7 +156,7 @@ void SASLSocket::send(const string& buffer) void SASLSocket::sendRaw(const char* buffer, const size_type count) { byte_t* output = 0; - int outputLen = 0; + long outputLen = 0; m_session->getMechanism()->encode (m_session, reinterpret_cast (buffer), count, @@ -180,7 +180,7 @@ void SASLSocket::sendRaw(const char* buffer, const size_type count) SASLSocket::size_type SASLSocket::sendRawNonBlocking(const char* buffer, const size_type count) { byte_t* output = 0; - int outputLen = 0; + long outputLen = 0; m_session->getMechanism()->encode (m_session, reinterpret_cast (buffer), count, -- cgit v1.2.3