зеркало из https://github.com/mozilla/pjs.git
Fix for bug 59673. Patch v4 submitted by Aleksey Nogin <ayn2@cornell.edu>. Fix compiler warning about variables not initialized before beeing used. R=ducarroz, SR=bienvenu
This commit is contained in:
Родитель
7336913fef
Коммит
a50ca41856
|
@ -986,7 +986,7 @@ PRBool PR_CALLBACK nsMsgAccountManager::cleanupOnExit(nsHashKey *aKey, void *aDa
|
||||||
nsIMsgIncomingServer *server = (nsIMsgIncomingServer*)aData;
|
nsIMsgIncomingServer *server = (nsIMsgIncomingServer*)aData;
|
||||||
PRBool emptyTrashOnExit = PR_FALSE;
|
PRBool emptyTrashOnExit = PR_FALSE;
|
||||||
PRBool cleanupInboxOnExit = PR_FALSE;
|
PRBool cleanupInboxOnExit = PR_FALSE;
|
||||||
nsresult rv, rv1, rv2;
|
nsresult rv;
|
||||||
|
|
||||||
server->GetEmptyTrashOnExit(&emptyTrashOnExit);
|
server->GetEmptyTrashOnExit(&emptyTrashOnExit);
|
||||||
nsCOMPtr <nsIImapIncomingServer> imapserver = do_QueryInterface(server);
|
nsCOMPtr <nsIImapIncomingServer> imapserver = do_QueryInterface(server);
|
||||||
|
@ -1043,8 +1043,8 @@ PRBool PR_CALLBACK nsMsgAccountManager::cleanupOnExit(nsHashKey *aKey, void *aDa
|
||||||
inboxFolder->GetFlags(&flags);
|
inboxFolder->GetFlags(&flags);
|
||||||
if (flags & MSG_FOLDER_FLAG_INBOX)
|
if (flags & MSG_FOLDER_FLAG_INBOX)
|
||||||
{
|
{
|
||||||
rv1 = inboxFolder->Compact(urlListener, nsnull /* msgwindow */);
|
rv = inboxFolder->Compact(urlListener, nsnull /* msgwindow */);
|
||||||
if (NS_SUCCEEDED(rv1))
|
if (NS_SUCCEEDED(rv))
|
||||||
accountManager->SetFolderDoingCleanupInbox(inboxFolder);
|
accountManager->SetFolderDoingCleanupInbox(inboxFolder);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1055,15 +1055,15 @@ PRBool PR_CALLBACK nsMsgAccountManager::cleanupOnExit(nsHashKey *aKey, void *aDa
|
||||||
|
|
||||||
if (emptyTrashOnExit)
|
if (emptyTrashOnExit)
|
||||||
{
|
{
|
||||||
rv2 = folder->EmptyTrash(nsnull, urlListener);
|
rv = folder->EmptyTrash(nsnull, urlListener);
|
||||||
if (isImap && NS_SUCCEEDED(rv2))
|
if (isImap && NS_SUCCEEDED(rv))
|
||||||
accountManager->SetFolderDoingEmptyTrash(folder);
|
accountManager->SetFolderDoingEmptyTrash(folder);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isImap && urlListener)
|
if (isImap && urlListener)
|
||||||
{
|
{
|
||||||
PRBool inProgress = PR_FALSE;
|
PRBool inProgress = PR_FALSE;
|
||||||
if (cleanupInboxOnExit && NS_SUCCEEDED(rv1))
|
if (cleanupInboxOnExit)
|
||||||
{
|
{
|
||||||
accountManager->GetCleanupInboxInProgress(&inProgress);
|
accountManager->GetCleanupInboxInProgress(&inProgress);
|
||||||
while (inProgress)
|
while (inProgress)
|
||||||
|
@ -1076,7 +1076,7 @@ PRBool PR_CALLBACK nsMsgAccountManager::cleanupOnExit(nsHashKey *aKey, void *aDa
|
||||||
eventQueue->ProcessPendingEvents();
|
eventQueue->ProcessPendingEvents();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (emptyTrashOnExit && NS_SUCCEEDED(rv2))
|
if (emptyTrashOnExit)
|
||||||
{
|
{
|
||||||
accountManager->GetEmptyTrashInProgress(&inProgress);
|
accountManager->GetEmptyTrashInProgress(&inProgress);
|
||||||
while (inProgress)
|
while (inProgress)
|
||||||
|
|
|
@ -130,7 +130,7 @@ nsresult nsMsgSearchDBView::OnNewHeader(nsMsgKey newKey, nsMsgKey aParentKey, PR
|
||||||
|
|
||||||
nsresult nsMsgSearchDBView::GetMsgHdrForViewIndex(nsMsgViewIndex index, nsIMsgDBHdr **msgHdr)
|
nsresult nsMsgSearchDBView::GetMsgHdrForViewIndex(nsMsgViewIndex index, nsIMsgDBHdr **msgHdr)
|
||||||
{
|
{
|
||||||
nsresult rv;
|
nsresult rv = NS_MSG_INVALID_DBVIEW_INDEX;
|
||||||
nsCOMPtr <nsISupports> supports = getter_AddRefs(m_folders->ElementAt(index));
|
nsCOMPtr <nsISupports> supports = getter_AddRefs(m_folders->ElementAt(index));
|
||||||
if(supports)
|
if(supports)
|
||||||
{
|
{
|
||||||
|
|
|
@ -110,11 +110,10 @@ nsMsgTxn::SetTransactionType(PRUint32 txnType)
|
||||||
nsresult
|
nsresult
|
||||||
nsMsgTxn::CheckForToggleDelete(nsIMsgFolder *aFolder, const nsMsgKey &aMsgKey, PRBool *aResult)
|
nsMsgTxn::CheckForToggleDelete(nsIMsgFolder *aFolder, const nsMsgKey &aMsgKey, PRBool *aResult)
|
||||||
{
|
{
|
||||||
nsresult rv;
|
|
||||||
NS_ENSURE_ARG(aResult);
|
NS_ENSURE_ARG(aResult);
|
||||||
nsCOMPtr<nsIMsgDBHdr> message;
|
nsCOMPtr<nsIMsgDBHdr> message;
|
||||||
nsCOMPtr<nsIMsgDatabase> db;
|
nsCOMPtr<nsIMsgDatabase> db;
|
||||||
aFolder->GetMsgDatabase(nsnull,getter_AddRefs(db));
|
nsresult rv = aFolder->GetMsgDatabase(nsnull,getter_AddRefs(db));
|
||||||
if (db)
|
if (db)
|
||||||
{
|
{
|
||||||
PRBool containsKey;
|
PRBool containsKey;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче