diff options
author | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2014-12-11 14:24:03 -0800 |
---|---|---|
committer | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2014-12-11 14:24:03 -0800 |
commit | 475d817e0230342443203f3b9b3dfe2a45a71779 (patch) | |
tree | 74803f62785a268e477fb82f96f98fc7e65f1686 /src/async | |
parent | 129a55d2098fbb114fcb7e785b31ce270e9cfda0 (diff) |
Fixed analyzer issues and warnings (#993 and fixed #992)
Diffstat (limited to 'src/async')
-rwxr-xr-x | src/async/imap/MCIMAPAsyncConnection.cpp | 7 | ||||
-rw-r--r-- | src/async/nntp/MCNNTPFetchOverviewOperation.cpp | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/async/imap/MCIMAPAsyncConnection.cpp b/src/async/imap/MCIMAPAsyncConnection.cpp index b2fc24c3..c03422ff 100755 --- a/src/async/imap/MCIMAPAsyncConnection.cpp +++ b/src/async/imap/MCIMAPAsyncConnection.cpp @@ -239,8 +239,11 @@ IMAPNamespace * IMAPAsyncConnection::defaultNamespace() void IMAPAsyncConnection::setClientIdentity(IMAPIdentity * identity) { MC_SAFE_REPLACE_COPY(IMAPIdentity, mClientIdentity, identity); - mc_foreacharray(String, key, identity->allInfoKeys()) { - mSession->clientIdentity()->setInfoForKey(key, identity->infoForKey(key)); + mSession->clientIdentity()->removeAllInfos(); + if (identity != NULL) { + mc_foreacharray(String, key, identity->allInfoKeys()) { + mSession->clientIdentity()->setInfoForKey(key, identity->infoForKey(key)); + } } } diff --git a/src/async/nntp/MCNNTPFetchOverviewOperation.cpp b/src/async/nntp/MCNNTPFetchOverviewOperation.cpp index b05b29e6..749ea222 100644 --- a/src/async/nntp/MCNNTPFetchOverviewOperation.cpp +++ b/src/async/nntp/MCNNTPFetchOverviewOperation.cpp @@ -52,7 +52,7 @@ Array * NNTPFetchOverviewOperation::articles() { void NNTPFetchOverviewOperation::main() { - ErrorCode error; + ErrorCode error = ErrorNone; mArticles = Array::array(); for(unsigned int i = 0 ; i < mIndexes->rangesCount() ; i ++) { Range range = mIndexes->allRanges()[i]; |