Issue #126: fixed some warnings.

This commit is contained in:
Vincent Richard 2016-03-13 17:45:19 +01:00
parent 68ad348b44
commit b68ca06e46
8 changed files with 15 additions and 6 deletions

View File

@ -45,7 +45,8 @@ folderAttributes::folderAttributes()
folderAttributes::folderAttributes(const folderAttributes& attribs) folderAttributes::folderAttributes(const folderAttributes& attribs)
: m_type(attribs.m_type), : object(),
m_type(attribs.m_type),
m_flags(attribs.m_flags), m_flags(attribs.m_flags),
m_userFlags(attribs.m_userFlags), m_userFlags(attribs.m_userFlags),
m_specialUse(attribs.m_specialUse) m_specialUse(attribs.m_specialUse)

View File

@ -456,6 +456,10 @@ void IMAPUtils::mailboxFlagsToFolderAttributes
specialUse = folderAttributes::SPECIALUSE_IMPORTANT; specialUse = folderAttributes::SPECIALUSE_IMPORTANT;
break; break;
default:
break;
} }
} }

View File

@ -123,7 +123,7 @@ bool maildirStore::isValidFolderName(const folder::path::component& name) const
// Name cannot start with '.' // Name cannot start with '.'
const size_t length = buf.length(); const size_t length = buf.length();
int pos = 0; size_t pos = 0;
while ((pos < length) && (buf[pos] == '.')) while ((pos < length) && (buf[pos] == '.'))
++pos; ++pos;

View File

@ -672,11 +672,14 @@ shared_ptr <folderStatus> POP3Folder::getStatus()
throw exceptions::command_error("STAT", response->getFirstLine()); throw exceptions::command_error("STAT", response->getFirstLine());
unsigned int count = 0; int count = 0;
std::istringstream iss(response->getText()); std::istringstream iss(response->getText());
iss >> count; iss >> count;
if (count < 0)
throw exceptions::invalid_response("STAT", response->getText());
shared_ptr <POP3FolderStatus> status = make_shared <POP3FolderStatus>(); shared_ptr <POP3FolderStatus> status = make_shared <POP3FolderStatus>();
status->setMessageCount(count); status->setMessageCount(count);

View File

@ -156,7 +156,7 @@ void POP3Message::extract
try try
{ {
POP3Response::readLargeResponse POP3Response::readLargeResponse
(store->getConnection(), os, progress, m_size == -1 ? 0 : m_size); (store->getConnection(), os, progress, m_size == static_cast <size_t>(-1) ? 0 : m_size);
} }
catch (exceptions::command_error& e) catch (exceptions::command_error& e)
{ {

View File

@ -601,7 +601,7 @@ int TLSSocket_OpenSSL::bio_puts(BIO* bio, const char* str)
// static // static
long TLSSocket_OpenSSL::bio_ctrl(BIO* bio, int cmd, long num, void* ptr) long TLSSocket_OpenSSL::bio_ctrl(BIO* bio, int cmd, long num, void* /* ptr */)
{ {
long ret = 1; long ret = 1;

View File

@ -118,7 +118,7 @@ private:
SSL* m_ssl; SSL* m_ssl;
unsigned long m_status; unsigned int m_status;
// Last exception thrown from C BIO functions // Last exception thrown from C BIO functions
scoped_ptr <exception> m_ex; scoped_ptr <exception> m_ex;

View File

@ -35,6 +35,7 @@ object::object()
object::object(const object&) object::object(const object&)
: enable_shared_from_this <object>()
{ {
} }