зеркало из https://github.com/mozilla/pjs.git
remove various unused variables, fix some signed/unsigned problems, fix some sscanf/printf format strings
This commit is contained in:
Родитель
7103bd56e2
Коммит
840de6c963
|
@ -331,9 +331,7 @@ nsMsgLocalMailFolder::GetMessages(nsIEnumerator* *result)
|
|||
|
||||
nsresult folderOpen = NS_OK;
|
||||
nsIMsgDatabase * mailDBFactory = nsnull;
|
||||
nsIMsgDatabase *mailDB;
|
||||
|
||||
nsIMessage * msgHdr = nsnull;
|
||||
rv = nsComponentManager::CreateInstance(kCMailDB, nsnull, nsIMsgDatabase::GetIID(), (void **) &mailDBFactory);
|
||||
if (NS_SUCCEEDED(rv) && mailDBFactory)
|
||||
{
|
||||
|
@ -747,14 +745,13 @@ NS_IMETHODIMP nsMsgLocalMailFolder::GetPrettyName(nsString& prettyName)
|
|||
|
||||
nsresult nsMsgLocalMailFolder::GetDBFolderInfoAndDB(nsIDBFolderInfo **folderInfo, nsIMsgDatabase **db)
|
||||
{
|
||||
nsresult openErr;
|
||||
nsresult openErr=NS_ERROR_UNEXPECTED;
|
||||
if(!db || !folderInfo)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
nsIMsgDatabase * mailDBFactory = nsnull;
|
||||
nsIMsgDatabase *mailDB;
|
||||
|
||||
nsIMessage * msgHdr = nsnull;
|
||||
nsresult rv = nsComponentManager::CreateInstance(kCMailDB, nsnull, nsIMsgDatabase::GetIID(), (void **) &mailDBFactory);
|
||||
if (NS_SUCCEEDED(rv) && mailDBFactory)
|
||||
{
|
||||
|
@ -1013,7 +1010,8 @@ NS_IMETHODIMP nsMsgLocalMailFolder::OnKeyDeleted(nsMsgKey aKeyChanged, int32 aFl
|
|||
nsISupports *msgSupports;
|
||||
if(NS_SUCCEEDED(pMessage->QueryInterface(kISupportsIID, (void**)&msgSupports)))
|
||||
{
|
||||
for(int i = 0; i < mListeners->Count(); i++)
|
||||
PRUint32 i;
|
||||
for(i = 0; i < mListeners->Count(); i++)
|
||||
{
|
||||
nsIFolderListener *listener = (nsIFolderListener*)mListeners->ElementAt(i);
|
||||
listener->OnItemRemoved(this, msgSupports);
|
||||
|
@ -1034,7 +1032,8 @@ NS_IMETHODIMP nsMsgLocalMailFolder::OnKeyAdded(nsMsgKey aKeyChanged, int32 aFlag
|
|||
nsISupports *msgSupports;
|
||||
if(pMessage && NS_SUCCEEDED(pMessage->QueryInterface(kISupportsIID, (void**)&msgSupports)))
|
||||
{
|
||||
for(int i = 0; i < mListeners->Count(); i++)
|
||||
PRUint32 i;
|
||||
for(i = 0; i < mListeners->Count(); i++)
|
||||
{
|
||||
nsIFolderListener *listener = (nsIFolderListener*)mListeners->ElementAt(i);
|
||||
listener->OnItemAdded(this, msgSupports);
|
||||
|
|
|
@ -106,7 +106,6 @@ void nsMailboxProtocol::Initialize(nsIURL * aURL)
|
|||
if (NS_SUCCEEDED(rv) && m_runningUrl)
|
||||
{
|
||||
// extract the file name and create a file transport...
|
||||
const char * fileName = nsnull;
|
||||
nsINetService* pNetService;
|
||||
rv = nsServiceManager::GetService(kNetServiceCID,
|
||||
nsINetService::GetIID(),
|
||||
|
|
|
@ -200,7 +200,6 @@ nsresult nsMailboxService::DisplayMessageNumber(const nsFileSpec& aMailboxPath,
|
|||
nsIMsgDatabase * mailDB = nsnull;
|
||||
nsIMsgDatabase *mailDBFactory;
|
||||
|
||||
nsIMessage * msgHdr = nsnull;
|
||||
rv = nsComponentManager::CreateInstance(kCMailDB, nsnull, nsIMsgDatabase::GetIID(), (void **) &mailDBFactory);
|
||||
if (NS_SUCCEEDED(rv) && mailDBFactory)
|
||||
{
|
||||
|
|
|
@ -517,7 +517,6 @@ nsresult nsMailboxUrl::ParseURL(const nsString& aSpec, const nsIURL* aURL)
|
|||
}
|
||||
#endif /* XP_UNIX */
|
||||
|
||||
const char* cp0 = cp;
|
||||
// The remainder of the string is the file name and the search path....
|
||||
// Strip out the ? stuff....
|
||||
char* search = strpbrk(cSpec, "?");
|
||||
|
|
|
@ -115,8 +115,10 @@ NS_IMETHODIMP nsMsgMailboxParser::OnStopBinding(nsIURL* aURL, nsresult aStatus,
|
|||
msgHdr->GetSubject(subject);
|
||||
char *authorStr = author.ToNewCString();
|
||||
char *subjectStr = subject.ToNewCString();
|
||||
#ifdef DEBUG
|
||||
// leak nsString return values...
|
||||
printf("hdr key = %ld, author = %s subject = %s\n", key, (authorStr) ? authorStr : "", (subjectStr) ? subjectStr : "");
|
||||
printf("hdr key = %d, author = %s subject = %s\n", key, (authorStr) ? authorStr : "", (subjectStr) ? subjectStr : "");
|
||||
#endif
|
||||
delete [] authorStr;
|
||||
delete [] subjectStr;
|
||||
msgHdr->Release();
|
||||
|
@ -795,7 +797,6 @@ int nsParseMailMessageState::ParseEnvelope (const char *line, PRUint32 line_size
|
|||
{
|
||||
const char *end;
|
||||
char *s;
|
||||
int status = 0;
|
||||
|
||||
m_envelope.AppendBuffer(line, line_size);
|
||||
end = m_envelope.GetBuffer() + line_size;
|
||||
|
@ -1032,11 +1033,7 @@ int nsParseMailMessageState::FinalizeHeaders()
|
|||
if (mozstatus2)
|
||||
{
|
||||
PRUint32 flags2 = 0;
|
||||
#ifdef OSF1
|
||||
sscanf(mozstatus2->value, " %x ", &flags2);
|
||||
#else
|
||||
sscanf(mozstatus2->value, " %lx ", &flags2);
|
||||
#endif
|
||||
flags |= flags2;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче