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:
ducarroz%netscape.com 2002-05-17 23:31:54 +00:00
Родитель 6c6164d334
Коммит d2d46232e8
3 изменённых файлов: 9 добавлений и 10 удалений

Просмотреть файл

@ -986,7 +986,7 @@ PRBool PR_CALLBACK nsMsgAccountManager::cleanupOnExit(nsHashKey *aKey, void *aDa
nsIMsgIncomingServer *server = (nsIMsgIncomingServer*)aData;
PRBool emptyTrashOnExit = PR_FALSE;
PRBool cleanupInboxOnExit = PR_FALSE;
nsresult rv, rv1, rv2;
nsresult rv;
server->GetEmptyTrashOnExit(&emptyTrashOnExit);
nsCOMPtr <nsIImapIncomingServer> imapserver = do_QueryInterface(server);
@ -1043,8 +1043,8 @@ PRBool PR_CALLBACK nsMsgAccountManager::cleanupOnExit(nsHashKey *aKey, void *aDa
inboxFolder->GetFlags(&flags);
if (flags & MSG_FOLDER_FLAG_INBOX)
{
rv1 = inboxFolder->Compact(urlListener, nsnull /* msgwindow */);
if (NS_SUCCEEDED(rv1))
rv = inboxFolder->Compact(urlListener, nsnull /* msgwindow */);
if (NS_SUCCEEDED(rv))
accountManager->SetFolderDoingCleanupInbox(inboxFolder);
break;
}
@ -1055,15 +1055,15 @@ PRBool PR_CALLBACK nsMsgAccountManager::cleanupOnExit(nsHashKey *aKey, void *aDa
if (emptyTrashOnExit)
{
rv2 = folder->EmptyTrash(nsnull, urlListener);
if (isImap && NS_SUCCEEDED(rv2))
rv = folder->EmptyTrash(nsnull, urlListener);
if (isImap && NS_SUCCEEDED(rv))
accountManager->SetFolderDoingEmptyTrash(folder);
}
if (isImap && urlListener)
{
PRBool inProgress = PR_FALSE;
if (cleanupInboxOnExit && NS_SUCCEEDED(rv1))
if (cleanupInboxOnExit)
{
accountManager->GetCleanupInboxInProgress(&inProgress);
while (inProgress)
@ -1076,7 +1076,7 @@ PRBool PR_CALLBACK nsMsgAccountManager::cleanupOnExit(nsHashKey *aKey, void *aDa
eventQueue->ProcessPendingEvents();
}
}
if (emptyTrashOnExit && NS_SUCCEEDED(rv2))
if (emptyTrashOnExit)
{
accountManager->GetEmptyTrashInProgress(&inProgress);
while (inProgress)

Просмотреть файл

@ -130,7 +130,7 @@ nsresult nsMsgSearchDBView::OnNewHeader(nsMsgKey newKey, nsMsgKey aParentKey, PR
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));
if(supports)
{

Просмотреть файл

@ -110,11 +110,10 @@ nsMsgTxn::SetTransactionType(PRUint32 txnType)
nsresult
nsMsgTxn::CheckForToggleDelete(nsIMsgFolder *aFolder, const nsMsgKey &aMsgKey, PRBool *aResult)
{
nsresult rv;
NS_ENSURE_ARG(aResult);
nsCOMPtr<nsIMsgDBHdr> message;
nsCOMPtr<nsIMsgDatabase> db;
aFolder->GetMsgDatabase(nsnull,getter_AddRefs(db));
nsresult rv = aFolder->GetMsgDatabase(nsnull,getter_AddRefs(db));
if (db)
{
PRBool containsKey;