aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/body.cpp4
-rw-r--r--src/net/imap/IMAPConnection.cpp4
-rw-r--r--src/net/pop3/POP3Store.cpp8
-rw-r--r--src/net/smtp/SMTPTransport.cpp4
-rw-r--r--src/security/sasl/SASLContext.cpp4
-rw-r--r--src/security/sasl/SASLSession.cpp4
-rw-r--r--src/security/sasl/SASLSocket.cpp12
-rw-r--r--src/security/sasl/builtinSASLMechanism.cpp12
-rw-r--r--src/utility/encoder/b64Encoder.cpp4
-rw-r--r--src/utility/encoder/qpEncoder.cpp8
-rw-r--r--src/utility/encoder/uuEncoder.cpp8
-rw-r--r--src/utility/progressListener.cpp8
12 files changed, 40 insertions, 40 deletions
diff --git a/src/body.cpp b/src/body.cpp
index 732fa8b5..e235d49a 100644
--- a/src/body.cpp
+++ b/src/body.cpp
@@ -520,7 +520,7 @@ const string body::generateRandomBoundaryString()
// Generate a string of random characters
unsigned int r = utility::random::getTime();
- unsigned int m = sizeof(unsigned int);
+ unsigned int m = static_cast <unsigned int>(sizeof(unsigned int));
for (size_t i = 2 ; i < (sizeof(boundary) / sizeof(boundary[0]) - 1) ; ++i)
{
@@ -530,7 +530,7 @@ const string body::generateRandomBoundaryString()
if (--m == 0)
{
r = utility::random::getNext();
- m = sizeof(unsigned int);
+ m = static_cast <unsigned int>(sizeof(unsigned int));
}
}
diff --git a/src/net/imap/IMAPConnection.cpp b/src/net/imap/IMAPConnection.cpp
index 6c8b400e..35c3dbe5 100644
--- a/src/net/imap/IMAPConnection.cpp
+++ b/src/net/imap/IMAPConnection.cpp
@@ -381,10 +381,10 @@ void IMAPConnection::authenticateSASL()
}
byte_t* challenge = 0;
- int challengeLen = 0;
+ long challengeLen = 0;
byte_t* resp = 0;
- int respLen = 0;
+ long respLen = 0;
try
{
diff --git a/src/net/pop3/POP3Store.cpp b/src/net/pop3/POP3Store.cpp
index 8233cdb2..f8a8ec0a 100644
--- a/src/net/pop3/POP3Store.cpp
+++ b/src/net/pop3/POP3Store.cpp
@@ -466,10 +466,10 @@ void POP3Store::authenticateSASL()
case RESPONSE_READY:
{
byte_t* challenge = 0;
- int challengeLen = 0;
+ long challengeLen = 0;
byte_t* resp = 0;
- int respLen = 0;
+ long respLen = 0;
try
{
@@ -749,7 +749,7 @@ void POP3Store::readResponse(string& buffer, const bool multiLine,
utility::progressListener* progress)
{
bool foundTerminator = false;
- int current = 0, total = 0;
+ long current = 0, total = 0;
if (progress)
progress->start(total);
@@ -846,7 +846,7 @@ void POP3Store::readResponse(string& buffer, const bool multiLine,
void POP3Store::readResponse(utility::outputStream& os,
utility::progressListener* progress, const int predictedSize)
{
- int current = 0, total = predictedSize;
+ long current = 0, total = predictedSize;
string temp;
bool codeDone = false;
diff --git a/src/net/smtp/SMTPTransport.cpp b/src/net/smtp/SMTPTransport.cpp
index eb29e65d..7c67fa02 100644
--- a/src/net/smtp/SMTPTransport.cpp
+++ b/src/net/smtp/SMTPTransport.cpp
@@ -381,10 +381,10 @@ void SMTPTransport::authenticateSASL()
case 334:
{
byte_t* challenge = 0;
- int challengeLen = 0;
+ long challengeLen = 0;
byte_t* resp = 0;
- int respLen = 0;
+ long respLen = 0;
try
{
diff --git a/src/security/sasl/SASLContext.cpp b/src/security/sasl/SASLContext.cpp
index 8c623124..bf601b35 100644
--- a/src/security/sasl/SASLContext.cpp
+++ b/src/security/sasl/SASLContext.cpp
@@ -106,7 +106,7 @@ ref <SASLMechanism> SASLContext::suggestMechanism
}
-void SASLContext::decodeB64(const string& input, byte_t** output, int* outputLen)
+void SASLContext::decodeB64(const string& input, byte_t** output, long* outputLen)
{
string res;
@@ -127,7 +127,7 @@ void SASLContext::decodeB64(const string& input, byte_t** output, int* outputLen
}
-const string SASLContext::encodeB64(const byte_t* input, const int inputLen)
+const string SASLContext::encodeB64(const byte_t* input, const long inputLen)
{
string res;
diff --git a/src/security/sasl/SASLSession.cpp b/src/security/sasl/SASLSession.cpp
index dcf53452..1ab6d577 100644
--- a/src/security/sasl/SASLSession.cpp
+++ b/src/security/sasl/SASLSession.cpp
@@ -99,8 +99,8 @@ ref <SASLContext> SASLSession::getContext()
bool SASLSession::evaluateChallenge
- (const byte_t* challenge, const int challengeLen,
- byte_t** response, int* responseLen)
+ (const byte_t* challenge, const long challengeLen,
+ byte_t** response, long* responseLen)
{
return m_mech->step(thisRef().dynamicCast <SASLSession>(),
challenge, challengeLen, response, responseLen);
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 <const byte_t*>(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 <const byte_t*>(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 <const byte_t*>(buffer), count,
diff --git a/src/security/sasl/builtinSASLMechanism.cpp b/src/security/sasl/builtinSASLMechanism.cpp
index 9501fb4b..618f4a3b 100644
--- a/src/security/sasl/builtinSASLMechanism.cpp
+++ b/src/security/sasl/builtinSASLMechanism.cpp
@@ -63,8 +63,8 @@ const string builtinSASLMechanism::getName() const
bool builtinSASLMechanism::step
- (ref <SASLSession> sess, const byte_t* challenge, const int challengeLen,
- byte_t** response, int* responseLen)
+ (ref <SASLSession> sess, const byte_t* challenge, const long challengeLen,
+ byte_t** response, long* responseLen)
{
char* output = 0;
size_t outputLen = 0;
@@ -121,8 +121,8 @@ bool builtinSASLMechanism::isComplete() const
void builtinSASLMechanism::encode
- (ref <SASLSession> sess, const byte_t* input, const int inputLen,
- byte_t** output, int* outputLen)
+ (ref <SASLSession> sess, const byte_t* input, const long inputLen,
+ byte_t** output, long* outputLen)
{
char* coutput = 0;
size_t coutputLen = 0;
@@ -154,8 +154,8 @@ void builtinSASLMechanism::encode
void builtinSASLMechanism::decode
- (ref <SASLSession> sess, const byte_t* input, const int inputLen,
- byte_t** output, int* outputLen)
+ (ref <SASLSession> sess, const byte_t* input, const long inputLen,
+ byte_t** output, long* outputLen)
{
char* coutput = 0;
size_t coutputLen = 0;
diff --git a/src/utility/encoder/b64Encoder.cpp b/src/utility/encoder/b64Encoder.cpp
index 58ef3200..85c972f9 100644
--- a/src/utility/encoder/b64Encoder.cpp
+++ b/src/utility/encoder/b64Encoder.cpp
@@ -197,8 +197,8 @@ utility::stream::size_type b64Encoder::decode(utility::inputStream& in,
// Process the data
char buffer[16384];
- int bufferLength = 0;
- int bufferPos = 0;
+ utility::stream::size_type bufferLength = 0;
+ utility::stream::size_type bufferPos = 0;
utility::stream::size_type total = 0;
utility::stream::size_type inTotal = 0;
diff --git a/src/utility/encoder/qpEncoder.cpp b/src/utility/encoder/qpEncoder.cpp
index ab8db2e4..9e1c1ccd 100644
--- a/src/utility/encoder/qpEncoder.cpp
+++ b/src/utility/encoder/qpEncoder.cpp
@@ -178,8 +178,8 @@ utility::stream::size_type qpEncoder::encode(utility::inputStream& in,
// Process the data
char buffer[16384];
- int bufferLength = 0;
- int bufferPos = 0;
+ utility::stream::size_type bufferLength = 0;
+ utility::stream::size_type bufferPos = 0;
string::size_type curCol = 0;
@@ -380,8 +380,8 @@ utility::stream::size_type qpEncoder::decode(utility::inputStream& in,
const bool rfc2047 = getProperties().getProperty <bool>("rfc2047", false);
char buffer[16384];
- int bufferLength = 0;
- int bufferPos = 0;
+ utility::stream::size_type bufferLength = 0;
+ utility::stream::size_type bufferPos = 0;
unsigned char outBuffer[16384];
int outBufferPos = 0;
diff --git a/src/utility/encoder/uuEncoder.cpp b/src/utility/encoder/uuEncoder.cpp
index 0ddfbac6..4b4d83d8 100644
--- a/src/utility/encoder/uuEncoder.cpp
+++ b/src/utility/encoder/uuEncoder.cpp
@@ -52,15 +52,15 @@ const std::vector <string> uuEncoder::getAvailableProperties() const
// This is the character encoding function to make a character printable
-static inline unsigned char UUENCODE(const unsigned char c)
+static inline unsigned char UUENCODE(const unsigned long c)
{
- return ((c & 077) + ' ');
+ return static_cast <unsigned char>((c & 077) + ' ');
}
// Single character decoding
-static inline unsigned char UUDECODE(const unsigned char c)
+static inline unsigned char UUDECODE(const unsigned long c)
{
- return ((c - ' ') & 077);
+ return static_cast <unsigned char>((c - ' ') & 077);
}
diff --git a/src/utility/progressListener.cpp b/src/utility/progressListener.cpp
index 4bce3721..ae5a455c 100644
--- a/src/utility/progressListener.cpp
+++ b/src/utility/progressListener.cpp
@@ -31,7 +31,7 @@ namespace utility {
// progressListenerSizeAdapter
progressListenerSizeAdapter::progressListenerSizeAdapter
- (progressListener* list, const int total)
+ (progressListener* list, const long total)
: m_wrapped(list), m_total(total)
{
}
@@ -43,14 +43,14 @@ bool progressListenerSizeAdapter::cancel() const
}
-void progressListenerSizeAdapter::start(const int predictedTotal)
+void progressListenerSizeAdapter::start(const long predictedTotal)
{
if (m_wrapped)
m_wrapped->start(predictedTotal);
}
-void progressListenerSizeAdapter::progress(const int current, const int currentTotal)
+void progressListenerSizeAdapter::progress(const long current, const long currentTotal)
{
if (m_wrapped)
{
@@ -62,7 +62,7 @@ void progressListenerSizeAdapter::progress(const int current, const int currentT
}
-void progressListenerSizeAdapter::stop(const int total)
+void progressListenerSizeAdapter::stop(const long total)
{
if (m_wrapped)
{