Bug 1294260 - Part 3: fix some compile warnings in mailnews that look syntactic only (hints and help from aleth and jorgk). r=jorgk, r=aleth CLOSED TREE

--HG--
extra : amend_source : 657132180b3913c71d4626a41b221ad95656ea98
This commit is contained in:
aceman 2016-08-14 10:21:26 +02:00
Родитель 3e60ac08a8
Коммит 61cdf322a0
65 изменённых файлов: 287 добавлений и 237 удалений

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

@ -209,16 +209,11 @@ NS_IMETHODIMP nsLDAPService::AddServer(nsILDAPServer *aServer)
//
rv = aServer->GetKey(getter_Copies(key));
if (NS_FAILED(rv)) {
switch (rv) {
// Only pass along errors we are aware of
//
case NS_ERROR_OUT_OF_MEMORY:
case NS_ERROR_NULL_POINTER:
if ((rv == NS_ERROR_OUT_OF_MEMORY) || (rv == NS_ERROR_NULL_POINTER))
return rv;
default:
else
return NS_ERROR_FAILURE;
}
}
// Create the new service server entry, and add it into the hash table
@ -720,17 +715,13 @@ nsLDAPService::EstablishConnection(nsLDAPServiceEntry *aEntry,
//
rv = operation->SimpleBind(password);
if (NS_FAILED(rv)) {
switch (rv) {
// Only pass along errors we are aware of
//
case NS_ERROR_LDAP_ENCODING_ERROR:
case NS_ERROR_FAILURE:
case NS_ERROR_OUT_OF_MEMORY:
if ((rv == NS_ERROR_LDAP_ENCODING_ERROR) ||
(rv == NS_ERROR_FAILURE) ||
(rv == NS_ERROR_OUT_OF_MEMORY))
return rv;
default:
else
return NS_ERROR_UNEXPECTED;
}
}
return NS_OK;

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

@ -41,8 +41,8 @@ public:
nsNetscapeProfileMigratorBase();
NS_IMETHOD GetSourceHasMultipleProfiles(bool* aResult);
NS_IMETHOD GetSourceExists(bool* aResult);
NS_IMETHOD GetSourceHasMultipleProfiles(bool* aResult) override;
NS_IMETHOD GetSourceExists(bool* aResult) override;
struct PrefTransform;
typedef nsresult(*prefConverter)(PrefTransform*, nsIPrefBranch*);

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

@ -22,10 +22,10 @@ public:
// nsIMailProfileMigrator methods
NS_IMETHOD Migrate(uint16_t aItems, nsIProfileStartup* aStartup,
const char16_t* aProfile);
const char16_t* aProfile) override;
NS_IMETHOD GetMigrateData(const char16_t* aProfile, bool aReplace,
uint16_t* aResult);
NS_IMETHOD GetSourceProfiles(nsIArray** aResult);
uint16_t* aResult) override;
NS_IMETHOD GetSourceProfiles(nsIArray** aResult) override;
protected:
virtual ~nsSeamonkeyProfileMigrator();

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

@ -35,14 +35,14 @@ public:
const nsACString &login,
const int32_t timeOut = 0);
// nsILDAPMessageListener
NS_IMETHOD OnLDAPMessage(nsILDAPMessage *aMessage);
NS_IMETHOD OnLDAPMessage(nsILDAPMessage *aMessage) override;
protected:
virtual ~nsAbModifyLDAPMessageListener();
nsresult Cancel();
virtual void InitFailed(bool aCancelled = false);
virtual nsresult DoTask();
virtual void InitFailed(bool aCancelled = false) override;
virtual nsresult DoTask() override;
nsresult DoMainTask();
nsresult OnLDAPMessageModifyResult(nsILDAPMessage *aMessage);
nsresult OnLDAPMessageRenameResult(nsILDAPMessage *aMessage);

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

@ -46,7 +46,7 @@ public:
const int32_t timeOut = 0);
// nsILDAPMessageListener
NS_IMETHOD OnLDAPMessage(nsILDAPMessage *aMessage);
NS_IMETHOD OnLDAPMessage(nsILDAPMessage *aMessage) override;
protected:
virtual ~nsAbQueryLDAPMessageListener ();
@ -56,8 +56,8 @@ protected:
friend class nsAbLDAPDirectoryQuery;
nsresult Cancel();
virtual nsresult DoTask();
virtual void InitFailed(bool aCancelled = false);
virtual nsresult DoTask() override;
virtual void InitFailed(bool aCancelled = false) override;
nsCOMPtr<nsILDAPURL> mSearchUrl;
nsIAbDirectoryQueryResultListener *mResultListener;
@ -174,6 +174,7 @@ NS_IMETHODIMP nsAbQueryLDAPMessageListener::OnLDAPMessage(nsILDAPMessage *aMessa
mWaitingForPrevQueryToFinish = false;
rv = OnLDAPMessageSearchResult(aMessage);
NS_ENSURE_SUCCESS(rv, rv);
break;
default:
break;
}

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

@ -1220,9 +1220,9 @@ void mime_error(const char *s)
int
yyparse()
{
register int yym, yyn, yystate;
int yym, yyn, yystate;
#if YYDEBUG
register char *yys;
char *yys;
extern char *getenv();
if (yys = getenv("YYDEBUG"))

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

@ -172,7 +172,9 @@ nsMsgFilter::nsMsgFilter():
m_filterList(nullptr),
m_expressionTree(nullptr)
{
NS_NewISupportsArray(getter_AddRefs(m_termList));
nsresult rv = NS_NewISupportsArray(getter_AddRefs(m_termList));
if (NS_FAILED(rv))
NS_ASSERTION(false, "Failed to allocate a nsISupportsArray for nsMsgFilter");
m_type = nsMsgFilterType::InboxRule | nsMsgFilterType::Manual;
}

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

@ -46,6 +46,7 @@
#include "nsAutoPtr.h"
#include "nsIMsgFilter.h"
#include "nsIMsgOperationListener.h"
#include "mozilla/Attributes.h"
#define BREAK_IF_FAILURE(_rv, _text) if (NS_FAILED(_rv)) { \
NS_WARNING(_text); \
@ -607,7 +608,7 @@ nsresult nsMsgFilterAfterTheFact::ApplyFilter()
// would not have run if move succeeded.
m_nextAction = numActions;
// Fall through to the copy case.
MOZ_FALLTHROUGH;
case nsMsgFilterAction::CopyToFolder:
{
nsCString uri;

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

@ -271,13 +271,12 @@ nsresult nsMsgSearchOfflineMail::OpenSummaryFile ()
else
return err; // not sure why m_folder wouldn't be set.
switch (err)
if (NS_SUCCEEDED(err))
return NS_OK;
if ((err == NS_MSG_ERROR_FOLDER_SUMMARY_MISSING) ||
(err == NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE))
{
case NS_OK:
break;
case NS_MSG_ERROR_FOLDER_SUMMARY_MISSING:
case NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE:
{
nsCOMPtr<nsIMsgLocalMailFolder> localFolder = do_QueryInterface(scopeFolder, &err);
if (NS_SUCCEEDED(err) && localFolder)
{
@ -292,12 +291,10 @@ nsresult nsMsgSearchOfflineMail::OpenSummaryFile ()
localFolder->ParseFolder(searchWindow, this);
}
}
}
break;
default:
{
NS_ASSERTION(false, "unexpected error opening db");
}
}
else
{
NS_ASSERTION(false, "unexpected error opening db");
}
return err;

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

@ -27,6 +27,7 @@
#include "nsISupportsArray.h"
#include "nsAlgorithm.h"
#include <algorithm>
#include "mozilla/Attributes.h"
// This stuff lives in the base class because the IMAP search syntax
// is used by the Dredd SEARCH command as well as IMAP itself
@ -326,6 +327,7 @@ nsresult nsMsgSearchAdapter::EncodeImapTerm (nsIMsgSearchTerm *term, bool really
case nsMsgSearchAttrib::ToOrCC:
orHeaderMnemonic = m_kImapCC;
// fall through to case nsMsgSearchAttrib::To:
MOZ_FALLTHROUGH;
case nsMsgSearchAttrib::To:
whichMnemonic = m_kImapTo;
break;

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

@ -32,7 +32,9 @@ nsMsgSearchSession::nsMsgSearchSession()
m_handlingError = false;
m_expressionTree = nullptr;
m_searchPaused = false;
NS_NewISupportsArray(getter_AddRefs(m_termList));
nsresult rv = NS_NewISupportsArray(getter_AddRefs(m_termList));
if (NS_FAILED(rv))
NS_ASSERTION(false, "Failed to allocate a nsISupportsArray for nsMsgFilter");
}
nsMsgSearchSession::~nsMsgSearchSession()

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

@ -47,7 +47,7 @@ public:
NS_IMETHOD GetTarget(nsIRDFResource *source,
nsIRDFResource *property,
bool aTruthValue,
nsIRDFNode **_retval);
nsIRDFNode **_retval) override;
NS_IMETHOD GetTargets(nsIRDFResource *source,
nsIRDFResource *property,
bool aTruthValue,

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

@ -48,6 +48,7 @@
#include "nsIAbDirectory.h"
#include "nsIAbCard.h"
#include "mozilla/Services.h"
#include "mozilla/Attributes.h"
#include "mozilla/mailnews/MimeHeaderParser.h"
#include "nsTArray.h"
#include <algorithm>
@ -2091,6 +2092,7 @@ NS_IMETHODIMP nsMsgDBView::CellTextForColumn(int32_t aRow,
keyString.AppendInt((int64_t)key);
aValue.Assign(keyString);
}
break;
default:
break;
}
@ -6657,6 +6659,7 @@ nsresult nsMsgDBView::NavigateFromPos(nsMsgNavigationTypeValue motion, nsMsgView
break;
case nsMsgNavigationType::firstUnreadMessage:
startIndex = nsMsgViewIndex_None; // note fall thru - is this motion ever used?
MOZ_FALLTHROUGH;
case nsMsgNavigationType::nextUnreadMessage:
for (curIndex = (startIndex == nsMsgViewIndex_None) ? 0 : startIndex; curIndex <= lastIndex && lastIndex != nsMsgViewIndex_None; curIndex++) {
uint32_t flags = m_flags[curIndex];

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

@ -497,7 +497,7 @@ nsFolderCompactState::FinishCompact()
m_folder->ForceDBClosed();
nsCOMPtr<nsIFile> cloneFile;
int64_t fileSize;
int64_t fileSize = 0;
rv = m_file->Clone(getter_AddRefs(cloneFile));
if (NS_SUCCEEDED(rv))
rv = cloneFile->GetFileSize(&fileSize);

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

@ -101,7 +101,7 @@ public:
nsresult status) override;
NS_IMETHODIMP OnDataAvailable(nsIRequest *request, nsISupports *ctxt,
nsIInputStream *inStr,
uint64_t sourceOffset, uint32_t count);
uint64_t sourceOffset, uint32_t count) override;
protected:
nsresult CopyNextMessage(bool &done);

3
mailnews/base/src/nsMsgGroupView.cpp Executable file → Normal file
Просмотреть файл

@ -14,6 +14,7 @@
#include "nsITreeColumns.h"
#include "nsMsgMessageFlags.h"
#include <plhash.h>
#include "mozilla/Attributes.h"
#define MSGHDR_CACHE_LOOK_AHEAD_SIZE 25 // Allocate this more to avoid reallocation on new mail.
#define MSGHDR_CACHE_MAX_SIZE 8192 // Max msghdr cache entries.
@ -226,6 +227,7 @@ nsresult nsMsgGroupView::HashHdr(nsIMsgDBHdr *msgHdr, nsString& aHashKey)
break;
case nsMsgViewSortType::byReceived:
rcvDate = true;
MOZ_FALLTHROUGH;
case nsMsgViewSortType::byDate:
{
uint32_t ageBucket;
@ -797,6 +799,7 @@ NS_IMETHODIMP nsMsgGroupView::CellTextForColumn(int32_t aRow,
{
case nsMsgViewSortType::byReceived:
rcvDate = true;
MOZ_FALLTHROUGH;
case nsMsgViewSortType::byDate:
{
uint32_t ageBucket = 0;

20
mailnews/base/src/nsMsgGroupView.h Executable file → Normal file
Просмотреть файл

@ -22,25 +22,27 @@ public:
nsMsgGroupView();
virtual ~nsMsgGroupView();
NS_IMETHOD Open(nsIMsgFolder *folder, nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder, nsMsgViewFlagsTypeValue viewFlags, int32_t *pCount);
NS_IMETHOD OpenWithHdrs(nsISimpleEnumerator *aHeaders, nsMsgViewSortTypeValue aSortType,
nsMsgViewSortOrderValue aSortOrder, nsMsgViewFlagsTypeValue aViewFlags,
int32_t *aCount);
NS_IMETHOD GetViewType(nsMsgViewTypeValue *aViewType);
NS_IMETHOD Open(nsIMsgFolder *folder, nsMsgViewSortTypeValue sortType,
nsMsgViewSortOrderValue sortOrder, nsMsgViewFlagsTypeValue viewFlags,
int32_t *pCount) override;
NS_IMETHOD OpenWithHdrs(nsISimpleEnumerator *aHeaders, nsMsgViewSortTypeValue aSortType,
nsMsgViewSortOrderValue aSortOrder, nsMsgViewFlagsTypeValue aViewFlags,
int32_t *aCount) override;
NS_IMETHOD GetViewType(nsMsgViewTypeValue *aViewType) override;
NS_IMETHOD CopyDBView(nsMsgDBView *aNewMsgDBView, nsIMessenger *aMessengerInstance,
nsIMsgWindow *aMsgWindow, nsIMsgDBViewCommandUpdater *aCmdUpdater);
NS_IMETHOD Close();
NS_IMETHOD Close() override;
NS_IMETHOD OnHdrDeleted(nsIMsgDBHdr *aHdrDeleted, nsMsgKey aParentKey, int32_t aFlags,
nsIDBChangeListener *aInstigator) override;
NS_IMETHOD OnHdrFlagsChanged(nsIMsgDBHdr *aHdrChanged, uint32_t aOldFlags,
uint32_t aNewFlags, nsIDBChangeListener *aInstigator) override;
NS_IMETHOD LoadMessageByViewIndex(nsMsgViewIndex aViewIndex);
NS_IMETHOD LoadMessageByViewIndex(nsMsgViewIndex aViewIndex) override;
NS_IMETHOD GetCellProperties(int32_t aRow, nsITreeColumn *aCol, nsAString& aProperties) override;
NS_IMETHOD GetRowProperties(int32_t aRow, nsAString& aProperties) override;
NS_IMETHOD CellTextForColumn(int32_t aRow, const char16_t *aColumnName,
nsAString &aValue);
NS_IMETHOD GetThreadContainingMsgHdr(nsIMsgDBHdr *msgHdr, nsIMsgThread **pThread);
nsAString &aValue) override;
NS_IMETHOD GetThreadContainingMsgHdr(nsIMsgDBHdr *msgHdr, nsIMsgThread **pThread) override;
NS_IMETHOD AddColumnHandler(const nsAString& column, nsIMsgCustomColumnHandler* handler) override;
protected:

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

@ -462,7 +462,7 @@ NS_IMETHODIMP nsMsgPurgeService::OnSearchDone(nsresult status)
{
if (NS_SUCCEEDED(status))
{
uint32_t count;
uint32_t count = 0;
if (mHdrsToDelete)
mHdrsToDelete->GetLength(&count);
MOZ_LOG(MsgPurgeLogModule, mozilla::LogLevel::Info, ("%d messages to delete", count));

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

@ -39,18 +39,18 @@ public:
nsIMessenger *aMessengerInstance,
nsIMsgWindow *aMsgWindow,
nsIMsgDBViewCommandUpdater *aCmdUpdater) override;
NS_IMETHOD DoCommand(nsMsgViewCommandTypeValue aCommand);
NS_IMETHOD DoCommand(nsMsgViewCommandTypeValue aCommand) override;
NS_IMETHOD GetViewType(nsMsgViewTypeValue *aViewType) override;
NS_IMETHOD SetViewFlags(nsMsgViewFlagsTypeValue aViewFlags);
NS_IMETHOD SetSearchSession(nsIMsgSearchSession *aSearchSession);
NS_IMETHOD GetSearchSession(nsIMsgSearchSession* *aSearchSession);
NS_IMETHOD SetViewFlags(nsMsgViewFlagsTypeValue aViewFlags) override;
NS_IMETHOD SetSearchSession(nsIMsgSearchSession *aSearchSession) override;
NS_IMETHOD GetSearchSession(nsIMsgSearchSession* *aSearchSession) override;
NS_IMETHOD OnHdrFlagsChanged(nsIMsgDBHdr *aHdrChanged, uint32_t aOldFlags,
uint32_t aNewFlags, nsIDBChangeListener *aInstigator) override;
NS_IMETHOD OnHdrPropertyChanged(nsIMsgDBHdr *aHdrToChange, bool aPreChange, uint32_t *aStatus,
nsIDBChangeListener * aInstigator) override;
NS_IMETHOD OnHdrDeleted(nsIMsgDBHdr *aHdrDeleted, nsMsgKey aParentKey,
int32_t aFlags, nsIDBChangeListener *aInstigator) override;
NS_IMETHOD GetNumMsgsInView(int32_t *aNumMsgs);
NS_IMETHOD GetNumMsgsInView(int32_t *aNumMsgs) override;
protected:
virtual ~nsMsgQuickSearchDBView();

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

@ -26,25 +26,25 @@ public:
NS_DECL_NSIMSGSEARCHNOTIFY
NS_DECL_NSIMSGCOPYSERVICELISTENER
NS_IMETHOD SetSearchSession(nsIMsgSearchSession *aSearchSession);
NS_IMETHOD SetSearchSession(nsIMsgSearchSession *aSearchSession) override;
virtual const char * GetViewName(void) {return "SearchView"; }
virtual const char *GetViewName(void) override { return "SearchView"; }
NS_IMETHOD Open(nsIMsgFolder *folder, nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder,
nsMsgViewFlagsTypeValue viewFlags, int32_t *pCount) override;
NS_IMETHOD CloneDBView(nsIMessenger *aMessengerInstance, nsIMsgWindow *aMsgWindow,
nsIMsgDBViewCommandUpdater *aCmdUpdater, nsIMsgDBView **_retval);
nsIMsgDBViewCommandUpdater *aCmdUpdater, nsIMsgDBView **_retval) override;
NS_IMETHOD CopyDBView(nsMsgDBView *aNewMsgDBView, nsIMessenger *aMessengerInstance,
nsIMsgWindow *aMsgWindow, nsIMsgDBViewCommandUpdater *aCmdUpdater) override;
NS_IMETHOD Close() override;
NS_IMETHOD GetViewType(nsMsgViewTypeValue *aViewType) override;
NS_IMETHOD Sort(nsMsgViewSortTypeValue sortType,
nsMsgViewSortOrderValue sortOrder);
NS_IMETHOD Sort(nsMsgViewSortTypeValue sortType,
nsMsgViewSortOrderValue sortOrder) override;
NS_IMETHOD GetCommandStatus(nsMsgViewCommandTypeValue command,
bool *selectable_p,
nsMsgViewCommandCheckStateValue *selected_p);
NS_IMETHOD DoCommand(nsMsgViewCommandTypeValue command);
NS_IMETHOD DoCommandWithFolder(nsMsgViewCommandTypeValue command, nsIMsgFolder *destFolder);
NS_IMETHOD GetHdrForFirstSelectedMessage(nsIMsgDBHdr **hdr);
bool *selectable_p,
nsMsgViewCommandCheckStateValue *selected_p) override;
NS_IMETHOD DoCommand(nsMsgViewCommandTypeValue command) override;
NS_IMETHOD DoCommandWithFolder(nsMsgViewCommandTypeValue command, nsIMsgFolder *destFolder) override;
NS_IMETHOD GetHdrForFirstSelectedMessage(nsIMsgDBHdr **hdr) override;
NS_IMETHOD OpenWithHdrs(nsISimpleEnumerator *aHeaders,
nsMsgViewSortTypeValue aSortType,
nsMsgViewSortOrderValue aSortOrder,
@ -54,12 +54,12 @@ public:
int32_t aFlags, nsIDBChangeListener *aInstigator) override;
NS_IMETHOD OnHdrFlagsChanged(nsIMsgDBHdr *aHdrChanged, uint32_t aOldFlags,
uint32_t aNewFlags, nsIDBChangeListener *aInstigator) override;
NS_IMETHOD GetNumMsgsInView(int32_t *aNumMsgs);
NS_IMETHOD GetNumMsgsInView(int32_t *aNumMsgs) override;
// override to get location
NS_IMETHOD GetCellText(int32_t aRow, nsITreeColumn* aCol, nsAString& aValue) override;
virtual nsresult GetMsgHdrForViewIndex(nsMsgViewIndex index, nsIMsgDBHdr **msgHdr) override;
virtual nsresult OnNewHeader(nsIMsgDBHdr *newHdr, nsMsgKey parentKey, bool ensureListed) override;
NS_IMETHOD GetFolderForViewIndex(nsMsgViewIndex index, nsIMsgFolder **folder);
NS_IMETHOD GetFolderForViewIndex(nsMsgViewIndex index, nsIMsgFolder **folder) override;
NS_IMETHOD OnAnnouncerGoingAway(nsIDBChangeAnnouncer *instigator) override;

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

@ -17,7 +17,7 @@ public:
virtual const char * GetViewName(void) override {return "ThreadsWithUnreadView"; }
NS_IMETHOD CloneDBView(nsIMessenger *aMessengerInstance, nsIMsgWindow *aMsgWindow, nsIMsgDBViewCommandUpdater *aCommandUpdater, nsIMsgDBView **_retval) override;
NS_IMETHOD GetViewType(nsMsgViewTypeValue *aViewType) override;
NS_IMETHOD GetNumMsgsInView(int32_t *aNumMsgs);
NS_IMETHOD GetNumMsgsInView(int32_t *aNumMsgs) override;
virtual bool WantsThisThread(nsIMsgThread *threadHdr) override;
protected:
@ -30,9 +30,11 @@ class nsMsgWatchedThreadsWithUnreadDBView : public nsMsgThreadedDBView
public:
nsMsgWatchedThreadsWithUnreadDBView ();
NS_IMETHOD GetViewType(nsMsgViewTypeValue *aViewType) override;
NS_IMETHOD CloneDBView(nsIMessenger *aMessengerInstance, nsIMsgWindow *aMsgWindow, nsIMsgDBViewCommandUpdater *aCommandUpdater, nsIMsgDBView **_retval) override;
NS_IMETHOD GetNumMsgsInView(int32_t *aNumMsgs);
virtual const char * GetViewName(void) override {return "WatchedThreadsWithUnreadView"; }
NS_IMETHOD CloneDBView(nsIMessenger *aMessengerInstance, nsIMsgWindow *aMsgWindow,
nsIMsgDBViewCommandUpdater *aCommandUpdater,
nsIMsgDBView **_retval) override;
NS_IMETHOD GetNumMsgsInView(int32_t *aNumMsgs) override;
virtual const char *GetViewName(void) override { return "WatchedThreadsWithUnreadView"; }
virtual bool WantsThisThread(nsIMsgThread *threadHdr) override;
protected:
virtual nsresult AddMsgToThreadNotInView(nsIMsgThread *threadHdr, nsIMsgDBHdr *msgHdr, bool ensureListed) override;

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

@ -679,6 +679,9 @@ NS_IMETHODIMP nsMsgThreadedDBView::OnParentChanged (nsMsgKey aKeyChanged, nsMsgK
{
// we need to adjust the level of the hdr whose parent changed, and invalidate that row,
// iff we're in threaded mode.
#if 0
// This code never runs due to the if (false) and Clang complains about it
// so it is ifdefed out for now.
if (false && m_viewFlags & nsMsgViewFlagsType::kThreadedDisplay)
{
nsMsgViewIndex childIndex = FindViewIndex(aKeyChanged);
@ -703,6 +706,7 @@ NS_IMETHODIMP nsMsgThreadedDBView::OnParentChanged (nsMsgKey aKeyChanged, nsMsgK
NoteChange(childIndex, 1, nsMsgViewNotificationCode::changed);
}
}
#endif
return NS_OK;
}

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

@ -16,15 +16,15 @@ public:
virtual ~nsMsgThreadedDBView();
NS_IMETHOD Open(nsIMsgFolder *folder, nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder, nsMsgViewFlagsTypeValue viewFlags, int32_t *pCount) override;
NS_IMETHOD CloneDBView(nsIMessenger *aMessengerInstance, nsIMsgWindow *aMsgWindow, nsIMsgDBViewCommandUpdater *aCommandUpdater, nsIMsgDBView **_retval);
NS_IMETHOD CloneDBView(nsIMessenger *aMessengerInstance, nsIMsgWindow *aMsgWindow, nsIMsgDBViewCommandUpdater *aCommandUpdater, nsIMsgDBView **_retval) override;
NS_IMETHOD Close() override;
int32_t AddKeys(nsMsgKey *pKeys, int32_t *pFlags, const char *pLevels, nsMsgViewSortTypeValue sortType, int32_t numKeysToAdd);
NS_IMETHOD Sort(nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder);
NS_IMETHOD Sort(nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder) override;
NS_IMETHOD GetViewType(nsMsgViewTypeValue *aViewType) override;
NS_IMETHOD OnParentChanged (nsMsgKey aKeyChanged, nsMsgKey oldParent, nsMsgKey newParent, nsIDBChangeListener *aInstigator) override;
protected:
virtual const char * GetViewName(void) {return "ThreadedDBView"; }
virtual const char *GetViewName(void) override { return "ThreadedDBView"; }
nsresult InitThreadedView(int32_t *pCount);
virtual nsresult OnNewHeader(nsIMsgDBHdr *newHdr, nsMsgKey aParentKey, bool ensureListed) override;
virtual nsresult AddMsgToThreadNotInView(nsIMsgThread *threadHdr, nsIMsgDBHdr *msgHdr, bool ensureListed);

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

@ -33,10 +33,10 @@ public:
NS_IMETHOD Close() override;
NS_IMETHOD GetViewType(nsMsgViewTypeValue *aViewType) override;
NS_IMETHOD DoCommand(nsMsgViewCommandTypeValue command) override;
NS_IMETHOD SetViewFlags(nsMsgViewFlagsTypeValue aViewFlags);
NS_IMETHOD SetViewFlags(nsMsgViewFlagsTypeValue aViewFlags) override;
NS_IMETHOD OnHdrPropertyChanged(nsIMsgDBHdr *aHdrToChange, bool aPreChange, uint32_t *aStatus,
nsIDBChangeListener * aInstigator) override;
NS_IMETHOD GetMsgFolder(nsIMsgFolder **aMsgFolder);
NS_IMETHOD GetMsgFolder(nsIMsgFolder **aMsgFolder) override;
virtual nsresult OnNewHeader(nsIMsgDBHdr *newHdr, nsMsgKey parentKey, bool ensureListed) override;
void UpdateCacheAndViewForPrevSearchedFolders(nsIMsgFolder *curSearchFolder);

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

@ -27,7 +27,6 @@ static const char kCookiesPermissions[] = "network.cookie.cookieBehavior";
static const char kCookiesLifetimeEnabled[] = "network.cookie.lifetime.enabled";
static const char kCookiesLifetimeDays[] = "network.cookie.lifetime.days";
static const char kCookiesLifetimeCurrentSession[] = "network.cookie.lifetime.behavior";
static const char kCookiesP3PString[] = "network.cookie.p3p";
static const char kCookiesAskPermission[] = "network.cookie.warnAboutCookies";
static const char kCookiesMaxPerHost[] = "network.cookie.maxPerHost";

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

@ -1012,7 +1012,7 @@ public:
//
// nsIOutputStreamCallback implementation ...
//
NS_IMETHODIMP OnOutputStreamReady(nsIAsyncOutputStream *aOutStream)
NS_IMETHODIMP OnOutputStreamReady(nsIAsyncOutputStream *aOutStream) override
{
NS_ASSERTION(mInStream, "not initialized");

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

@ -42,7 +42,6 @@ protected:
private:
nsCOMPtr<nsIMsgFolder> mParentFolder;
nsTArray<nsMsgKey> mMarkedMessages;
bool mWasMarkedRead;
};
#endif // nsMsgBaseUndoTxn_h_

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

@ -2332,7 +2332,7 @@ class CharsetDetectionObserver : public nsICharsetDetectionObserver
public:
NS_DECL_ISUPPORTS
CharsetDetectionObserver() {};
NS_IMETHOD Notify(const char* aCharset, nsDetectionConfident aConf)
NS_IMETHOD Notify(const char* aCharset, nsDetectionConfident aConf) override
{
mCharset = aCharset;
return NS_OK;

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

@ -6,6 +6,11 @@
const char16_t* errorStringNameForErrorCode(nsresult aCode)
{
#ifdef __GNUC__
// Temporary workaroung until bug 783526 is fixed.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wswitch"
#endif
switch(aCode)
{
case NS_MSG_UNABLE_TO_OPEN_FILE:
@ -105,4 +110,7 @@ const char16_t* errorStringNameForErrorCode(nsresult aCode)
default:
return u"sendFailed";
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
}

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

@ -77,7 +77,7 @@ PR_BEGIN_EXTERN_C
/*
** string utils.
*/
int write_stream(appledouble_encode_object *p_ap_encode_obj,char *s,int len);
int write_stream(appledouble_encode_object *p_ap_encode_obj, const char *s,int len);
int fill_apple_mime_header(appledouble_encode_object *p_ap_encode_obj);
int ap_encode_file_infor(appledouble_encode_object *p_ap_encode_obj);

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

@ -144,9 +144,9 @@ int ap_encode_next(
*/
if (p_ap_encode_obj->s_overflow)
{
status = write_stream(p_ap_encode_obj,
p_ap_encode_obj->b_overflow,
p_ap_encode_obj->s_overflow);
status = write_stream(p_ap_encode_obj,
(const char*)(p_ap_encode_obj->b_overflow),
p_ap_encode_obj->s_overflow);
if (status != noErr)
return status;

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

@ -44,8 +44,8 @@ static int finish64(appledouble_encode_object* p_ap_encode_obj);
*/
int write_stream(
appledouble_encode_object *p_ap_encode_obj,
char *out_string,
int len)
const char *out_string,
int len)
{
if (p_ap_encode_obj->pos_outbuff + len < p_ap_encode_obj->s_outbuff)
{
@ -90,9 +90,7 @@ int fill_apple_mime_header(
PR_snprintf(tmpstr, sizeof(tmpstr),
"Content-Type: multipart/appledouble; boundary=\"=\"; name=\"");
status = write_stream(p_ap_encode_obj,
tmpstr,
strlen(tmpstr));
status = write_stream(p_ap_encode_obj, (const char*)tmpstr, strlen(tmpstr));
if (status != noErr)
return status;
@ -107,9 +105,7 @@ int fill_apple_mime_header(
p_ap_encode_obj->fname);
#endif /* 0 */
PR_snprintf(tmpstr, sizeof(tmpstr), "--%s" CRLF, p_ap_encode_obj->boundary);
status = write_stream(p_ap_encode_obj,
tmpstr,
strlen(tmpstr));
status = write_stream(p_ap_encode_obj, (const char*)tmpstr, strlen(tmpstr));
return status;
}
@ -286,9 +282,7 @@ int ap_encode_header(
{
PL_strcpy(rd_buff,
"Content-Type: application/applefile\r\nContent-Transfer-Encoding: base64\r\n\r\n");
status = write_stream(p_ap_encode_obj,
rd_buff,
strlen(rd_buff));
status = write_stream(p_ap_encode_obj, (const char*)rd_buff, strlen(rd_buff));
if (status != noErr)
return status;
@ -350,48 +344,49 @@ int ap_encode_header(
CRLF "--%s" CRLF,
p_ap_encode_obj->boundary);
status = write_stream(p_ap_encode_obj,
rd_buff,
strlen(rd_buff));
status = write_stream(p_ap_encode_obj, (const char*)rd_buff, strlen(rd_buff));
if (status == noErr)
status = errDone;
}
return status;
}
#if 0
// This is unused for now and Clang complains about that is it is ifdefed out
static void replace(char *p, int len, char frm, char to)
{
for (; len > 0; len--, p++)
if (*p == frm) *p = to;
}
#endif
/* Description of the various file formats and their magic numbers */
struct magic
struct magic
{
char *name; /* Name of the file format */
char *num; /* The magic number */
int len; /* Length (0 means strlen(magicnum)) */
const char *name; /* Name of the file format */
const char *num; /* The magic number */
int len; /* Length (0 means strlen(magicnum)) */
};
/* The magic numbers of the file formats we know about */
static struct magic magic[] =
static struct magic magic[] =
{
{ "image/gif", "GIF", 0 },
{ "image/jpeg", "\377\330\377", 0 },
{ "video/mpeg", "\0\0\001\263", 4 },
{ "application/postscript", "%!", 0 },
};
static int num_magic = (sizeof(magic)/sizeof(magic[0]));
static int num_magic = MOZ_ARRAY_LENGTH(magic);
static char *text_type = TEXT_PLAIN; /* the text file type. */
static char *default_type = APPLICATION_OCTET_STREAM;
static const char *text_type = TEXT_PLAIN; /* the text file type. */
static const char *default_type = APPLICATION_OCTET_STREAM;
/*
* Determins the format of the file "inputf". The name
* of the file format (or NULL on error) is returned.
*/
static char *magic_look(char *inbuff, int numread)
static const char *magic_look(char *inbuff, int numread)
{
int i, j;
@ -437,7 +432,7 @@ int ap_encode_data(
if (firstime)
{
char* magic_type;
const char* magic_type;
/*
** preparing to encode the data fork.
@ -493,9 +488,7 @@ int ap_encode_data(
leafName.get(),
leafName.get());
status = write_stream(p_ap_encode_obj,
rd_buff,
strlen(rd_buff));
status = write_stream(p_ap_encode_obj, (const char*)rd_buff, strlen(rd_buff));
if (status != noErr)
return status;
}
@ -509,7 +502,9 @@ int ap_encode_data(
retval = ::FSReadFork(p_ap_encode_obj->fileId, fsAtMark, 0, 256, rd_buff, &in_count);
if (in_count)
{
#if 0
/* replace(rd_buff, in_count, '\r', '\n'); */
#endif
/* ** may be need to do character set conversion here for localization. ** */
status = to64(p_ap_encode_obj,
rd_buff,
@ -534,9 +529,7 @@ int ap_encode_data(
CRLF "--%s--" CRLF CRLF,
p_ap_encode_obj->boundary);
status = write_stream(p_ap_encode_obj,
rd_buff,
strlen(rd_buff));
status = write_stream(p_ap_encode_obj, (const char*)rd_buff, strlen(rd_buff));
if (status == noErr)
status = errDone;
@ -706,7 +699,5 @@ static int output64chunk(
*p++ = basis_64[((c2 & 0xF) << 2) | ((c3 & 0xC0) >>6)];
*p++ = basis_64[c3 & 0x3F];
}
return write_stream(p_ap_encode_obj,
tmpstr,
p-tmpstr);
return write_stream(p_ap_encode_obj, (const char*) tmpstr, p-tmpstr);
}

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

@ -75,6 +75,7 @@
#include "nsIArray.h"
#include "nsArrayUtils.h"
#include "mozilla/Services.h"
#include "mozilla/Attributes.h"
#include "mozilla/mailnews/MimeEncoder.h"
#include "mozilla/mailnews/MimeHeaderParser.h"
#include "nsIMutableArray.h"
@ -172,7 +173,7 @@ static nsresult StripOutGroupNames(char * addresses)
group = false;
//end of the group, act like a recipient separator now...
/* NO BREAK */
MOZ_FALLTHROUGH;
case ',':
if (!quoted)
{
@ -3165,6 +3166,11 @@ NS_IMETHODIMP nsMsgComposeAndSend::SendDeliveryCallback(nsIURI *aUrl, bool inIsN
{
if (NS_FAILED(aExitCode))
{
#ifdef __GNUC__
// Temporary workaroung until bug 783526 is fixed.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wswitch"
#endif
switch (aExitCode)
{
case NS_ERROR_UNKNOWN_HOST:
@ -3190,6 +3196,9 @@ NS_IMETHODIMP nsMsgComposeAndSend::SendDeliveryCallback(nsIURI *aUrl, bool inIsN
aExitCode = NS_ERROR_SMTP_SEND_FAILED_UNKNOWN_REASON;
break;
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
}
DeliverAsMailExit(aUrl, aExitCode);
}

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

@ -274,6 +274,11 @@ NS_IMETHODIMP nsMsgSendReport::DisplayReport(nsIPrompt *prompt, bool showErrorOn
//Do we have an explanation of the error? if no, try to build one...
if (currMessage.IsEmpty())
{
#ifdef __GNUC__
// Temporary workaroung until bug 783526 is fixed.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wswitch"
#endif
switch (currError)
{
case NS_BINDING_ABORTED:
@ -290,6 +295,9 @@ NS_IMETHODIMP nsMsgSendReport::DisplayReport(nsIPrompt *prompt, bool showErrorOn
nsMsgGetMessageByName(errorString, currMessage);
break;
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
}
if (mDeliveryMode == nsIMsgCompDeliverMode::Now || mDeliveryMode == nsIMsgCompDeliverMode::SendUnsent)

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

@ -40,6 +40,7 @@
#include "nsIIDNService.h"
#include "mozilla/mailnews/MimeHeaderParser.h"
#include "mozilla/Services.h"
#include "mozilla/Attributes.h"
#include "nsINetAddr.h"
#include "nsIProxyInfo.h"
@ -93,6 +94,11 @@ nsresult nsExplainErrorDetails(nsISmtpUrl * aSmtpUrl, nsresult aCode, ...)
va_start (args, aCode);
const char16_t* exitString;
#ifdef __GNUC__
// Temporary workaroung until bug 783526 is fixed.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wswitch"
#endif
switch (aCode)
{
case NS_ERROR_ILLEGAL_LOCALPART:
@ -120,6 +126,9 @@ nsresult nsExplainErrorDetails(nsISmtpUrl * aSmtpUrl, nsresult aCode, ...)
msg = nsTextFormatter::smprintf(eMsg.get(), aCode);
break;
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
if (msg)
{
@ -897,6 +906,7 @@ void nsSmtpProtocol::InitPrefAuthMethods(int32_t authMethodPrefValue)
MOZ_LOG(SMTPLogModule, mozilla::LogLevel::Error,
("SMTP: bad pref authMethod = %d\n", authMethodPrefValue));
// fall to any
MOZ_FALLTHROUGH;
case nsMsgAuthMethod::anything:
m_prefAuthMethods =
SMTP_AUTH_LOGIN_ENABLED | SMTP_AUTH_PLAIN_ENABLED |

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

@ -1035,7 +1035,7 @@ public:
NS_IMETHOD CollectReports(nsIMemoryReporterCallback*aCb,
nsISupports* aClosure,
bool aAnonymize)
bool aAnonymize) override
{
nsCString path;
GetPath(path, aAnonymize);

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

@ -11,6 +11,7 @@
#include "nsIMsgThread.h"
#include "nsMsgMimeCID.h"
#include "nsIMimeConverter.h"
#include "mozilla/Attributes.h"
using namespace mozilla::mailnews;
@ -769,6 +770,7 @@ const char *nsMsgHdr::GetNextReference(const char *startNextRef,
// intentional fallthrough so whitespaceEndedAt will definitely have
// a non-NULL value, just in case the message-id is not valid (no '>')
// and the old-school support is desired.
MOZ_FALLTHROUGH;
default:
if (!whitespaceEndedAt)
whitespaceEndedAt = ptr;

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

@ -44,6 +44,7 @@ using namespace mozilla;
#include <prmem.h>
#include "nsIMsgTraitService.h"
#include "mozilla/Services.h"
#include "mozilla/Attributes.h"
#include <cstdlib> // for std::abs(int/long)
#include <cmath> // for std::abs(float/double)
@ -546,6 +547,7 @@ void Tokenizer::tokenizeHeaders(nsIUTF8StringEnumerator * aHeaderNames, nsIUTF8S
if (Substring(headerName, 0, 9).Equals("x-mozilla"))
break;
// fall through
MOZ_FALLTHROUGH;
case 'u':
addTokenForHeader(headerName.get(), headerValue);
break;

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

@ -72,7 +72,7 @@ public:
NS_IMETHOD GetMsgFolderFromURI(nsIMsgFolder *aFolderResource,
const nsACString& aURI,
nsIMsgFolder **aFolder) override;
NS_IMETHOD SetSocketType(int32_t aSocketType);
NS_IMETHOD SetSocketType(int32_t aSocketType) override;
NS_IMETHOD VerifyLogon(nsIUrlListener *aUrlListener, nsIMsgWindow *aMsgWindow,
nsIURI **aURL) override;

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

@ -94,6 +94,7 @@
#include "nsMsgLineBuffer.h"
#include <algorithm>
#include "mozilla/Logging.h"
#include "mozilla/Attributes.h"
#include "nsStringStream.h"
#include "nsIStreamListener.h"
@ -825,18 +826,17 @@ NS_IMETHODIMP nsImapMailFolder::UpdateFolderWithListener(nsIMsgWindow *aMsgWindo
mailnewsUrl->RegisterListener(this);
m_urlListener = aUrlListener;
}
switch (rv)
if (rv == NS_MSG_ERROR_OFFLINE)
{
case NS_MSG_ERROR_OFFLINE:
if (aMsgWindow)
AutoCompact(aMsgWindow);
// note fall through to next case.
case NS_BINDING_ABORTED:
rv = NS_OK;
NotifyFolderEvent(mFolderLoadedAtom);
break;
default:
break;
if (aMsgWindow)
AutoCompact(aMsgWindow);
}
if (rv == NS_MSG_ERROR_OFFLINE || rv == NS_BINDING_ABORTED)
{
rv = NS_OK;
NotifyFolderEvent(mFolderLoadedAtom);
}
}
else if (NS_SUCCEEDED(rv)) // tell the front end that the folder is loaded if we're not going to
@ -3538,6 +3538,7 @@ NS_IMETHODIMP nsImapMailFolder::ApplyFilterHit(nsIMsgFilter *filter, nsIMsgWindo
msgIsNew = false;
}
// note that delete falls through to move.
MOZ_FALLTHROUGH;
case nsMsgFilterAction::MoveToFolder:
{
// if moving to a different file, do it.

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

@ -210,7 +210,7 @@ public:
NS_IMETHOD CreateSubfolder(const nsAString& folderName,nsIMsgWindow *msgWindow ) override;
NS_IMETHOD AddSubfolder(const nsAString& aName, nsIMsgFolder** aChild) override;
NS_IMETHODIMP CreateStorageIfMissing(nsIUrlListener* urlListener);
NS_IMETHODIMP CreateStorageIfMissing(nsIUrlListener* urlListener) override;
NS_IMETHOD Compact(nsIUrlListener *aListener, nsIMsgWindow *aMsgWindow) override;
NS_IMETHOD CompactAll(nsIUrlListener *aListener, nsIMsgWindow *aMsgWindow,

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

@ -75,6 +75,7 @@ PRLogModuleInfo *IMAP;
#include "nsMsgCompressOStream.h"
#include "nsAlgorithm.h"
#include "mozilla/Logging.h"
#include "mozilla/Attributes.h"
#include "nsIPrincipal.h"
#include "nsContentSecurityManager.h"
@ -2703,6 +2704,7 @@ void nsImapProtocol::ProcessSelectedStateURL()
case nsIImapUrl::nsImapExpungeFolder:
Expunge();
// note fall through to next cases.
MOZ_FALLTHROUGH;
case nsIImapUrl::nsImapSelectFolder:
case nsIImapUrl::nsImapSelectNoopFolder:
if (!moreHeadersToDownload)
@ -5528,6 +5530,7 @@ void nsImapProtocol::InitPrefAuthMethods(int32_t authMethodPrefValue,
MOZ_LOG(IMAP, LogLevel::Error,
("IMAP: bad pref authMethod = %d\n", authMethodPrefValue));
// fall to any
MOZ_FALLTHROUGH;
case nsMsgAuthMethod::anything:
m_prefAuthMethods = kHasAuthOldLoginCapability |
kHasAuthLoginCapability | kHasAuthPlainCapability |

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

@ -562,7 +562,7 @@ private:
nsresult GetMsgWindow(nsIMsgWindow ** aMsgWindow);
// End Process AuthenticatedState Url helper methods
virtual char const *GetType() {return "imap";}
virtual char const *GetType() override {return "imap";}
// Quota support
void GetQuotaDataIfSupported(const char *aBoxName);

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

@ -241,7 +241,7 @@ void nsImapServerResponseParser::ParseIMAPServerResponse(const char *aCurrentCom
// it's possible that we ate this + while parsing certain responses (like cram data),
// in these cases, the parsing routine for that specific command will manually set
// fWaitingForMoreClientInput so we don't lose that information....
if (fNextToken && (*fNextToken == '+') || inIdle)
if ((fNextToken && (*fNextToken == '+')) || inIdle)
{
fWaitingForMoreClientInput = true;
}

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

@ -865,7 +865,7 @@ NS_IMETHODIMP nsImapUrl::AllocateServerPath(const char * canonicalPath, char onl
if (!result)
return NS_ERROR_OUT_OF_MEMORY;
register unsigned char* dst = (unsigned char *) result;
unsigned char* dst = (unsigned char *) result;
src = sourcePath;
for (i = 0; i < len; i++)
{
@ -887,8 +887,8 @@ NS_IMETHODIMP nsImapUrl::AllocateServerPath(const char * canonicalPath, char onl
/* static */ nsresult nsImapUrl::UnescapeSlashes(char *sourcePath)
{
register char *src = sourcePath;
register char *dst = sourcePath;
char *src = sourcePath;
char *dst = sourcePath;
while (*src)
{

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

@ -44,21 +44,21 @@ public:
NS_DECL_THREADSAFE_ISUPPORTS
/* nsISupports GetData (in string dataId); */
NS_IMETHOD GetData(const char *dataId, nsISupports **_retval);
NS_IMETHOD GetData(const char *dataId, nsISupports **_retval) override;
NS_IMETHOD SetData(const char *dataId, nsISupports *pData);
NS_IMETHOD SetData(const char *dataId, nsISupports *pData) override;
NS_IMETHOD GetStatus(const char *statusKind, int32_t *_retval);
NS_IMETHOD GetStatus(const char *statusKind, int32_t *_retval) override;
NS_IMETHOD WantsProgress(bool *_retval);
NS_IMETHOD WantsProgress(bool *_retval) override;
NS_IMETHOD BeginImport(nsISupportsString *successLog, nsISupportsString *errorLog, bool *_retval) ;
NS_IMETHOD BeginImport(nsISupportsString *successLog, nsISupportsString *errorLog, bool *_retval) override;
NS_IMETHOD ContinueImport(bool *_retval);
NS_IMETHOD ContinueImport(bool *_retval) override;
NS_IMETHOD GetProgress(int32_t *_retval);
NS_IMETHOD GetProgress(int32_t *_retval) override;
NS_IMETHOD CancelImport(void);
NS_IMETHOD CancelImport(void) override;
private:
virtual ~nsImportGenericAddressBooks();

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

@ -55,21 +55,21 @@ public:
NS_DECL_THREADSAFE_ISUPPORTS
/* nsISupports GetData (in string dataId); */
NS_IMETHOD GetData(const char *dataId, nsISupports **_retval);
NS_IMETHOD GetData(const char *dataId, nsISupports **_retval) override;
NS_IMETHOD SetData(const char *dataId, nsISupports *pData);
NS_IMETHOD SetData(const char *dataId, nsISupports *pData) override;
NS_IMETHOD GetStatus(const char *statusKind, int32_t *_retval);
NS_IMETHOD GetStatus(const char *statusKind, int32_t *_retval) override;
NS_IMETHOD WantsProgress(bool *_retval);
NS_IMETHOD WantsProgress(bool *_retval) override;
NS_IMETHODIMP BeginImport(nsISupportsString *successLog, nsISupportsString *errorLog, bool *_retval) ;
NS_IMETHODIMP BeginImport(nsISupportsString *successLog, nsISupportsString *errorLog, bool *_retval) override;
NS_IMETHOD ContinueImport(bool *_retval);
NS_IMETHOD ContinueImport(bool *_retval) override;
NS_IMETHOD GetProgress(int32_t *_retval);
NS_IMETHOD GetProgress(int32_t *_retval) override;
NS_IMETHOD CancelImport(void);
NS_IMETHOD CancelImport(void) override;
private:
virtual ~nsImportGenericMail();

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

@ -330,7 +330,8 @@ NS_IMETHODIMP nsProxySendRunnable::Run()
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsISupportsArray> supportsArray;
NS_NewISupportsArray(getter_AddRefs(supportsArray));
rv = NS_NewISupportsArray(getter_AddRefs(supportsArray));
NS_ENSURE_SUCCESS(rv, rv);
if (m_embeddedAttachments) {
nsCOMPtr<nsISimpleEnumerator> enumerator;

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

@ -60,18 +60,18 @@ public:
NS_DECL_THREADSAFE_ISUPPORTS
// nsIImportAddressBooks interface
NS_IMETHOD GetSupportsMultiple(bool *_retval) { *_retval = false; return NS_OK;}
NS_IMETHOD GetAutoFind(char16_t **description, bool *_retval);
NS_IMETHOD GetSupportsMultiple(bool *_retval) override { *_retval = false; return NS_OK;}
NS_IMETHOD GetNeedsFieldMap(nsIFile *location, bool *_retval);
NS_IMETHOD GetAutoFind(char16_t **description, bool *_retval) override;
NS_IMETHOD GetDefaultLocation(nsIFile **location, bool *found, bool *userVerify);
NS_IMETHOD GetNeedsFieldMap(nsIFile *location, bool *_retval) override;
NS_IMETHOD FindAddressBooks(nsIFile *location, nsIArray **_retval);
NS_IMETHOD GetDefaultLocation(nsIFile **location, bool *found, bool *userVerify) override;
NS_IMETHOD InitFieldMap(nsIImportFieldMap *fieldMap);
NS_IMETHOD FindAddressBooks(nsIFile *location, nsIArray **_retval) override;
NS_IMETHOD InitFieldMap(nsIImportFieldMap *fieldMap) override;
NS_IMETHOD ImportAddressBook(nsIImportABDescriptor *source,
nsIAddrDatabase *destination,
@ -79,13 +79,13 @@ public:
nsISupports *aSupportService,
char16_t **errorLog,
char16_t **successLog,
bool *fatalError);
bool *fatalError) override;
NS_IMETHOD GetImportProgress(uint32_t *_retval);
NS_IMETHOD GetImportProgress(uint32_t *_retval) override;
NS_IMETHOD GetSampleData(int32_t index, bool *pFound, char16_t **pStr);
NS_IMETHOD GetSampleData(int32_t index, bool *pFound, char16_t **pStr) override;
NS_IMETHOD SetSampleLocation(nsIFile *);
NS_IMETHOD SetSampleLocation(nsIFile *) override;
private:
void ClearSampleFile(void);

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

@ -42,20 +42,20 @@ public:
// TODO: support multiple vCard files in future - shouldn't be too hard,
// since you just import each file in turn.
NS_IMETHOD GetSupportsMultiple(bool *_retval)
NS_IMETHOD GetSupportsMultiple(bool *_retval) override
{ *_retval = false; return NS_OK;}
NS_IMETHOD GetAutoFind(char16_t **description, bool *_retval);
NS_IMETHOD GetAutoFind(char16_t **description, bool *_retval) override;
NS_IMETHOD GetNeedsFieldMap(nsIFile *location, bool *_retval)
NS_IMETHOD GetNeedsFieldMap(nsIFile *location, bool *_retval) override
{ *_retval = false; return NS_OK;}
NS_IMETHOD GetDefaultLocation(
nsIFile **location, bool *found, bool *userVerify);
nsIFile **location, bool *found, bool *userVerify) override;
NS_IMETHOD FindAddressBooks(nsIFile *location, nsIArray **_retval);
NS_IMETHOD FindAddressBooks(nsIFile *location, nsIArray **_retval) override;
NS_IMETHOD InitFieldMap(nsIImportFieldMap *fieldMap)
NS_IMETHOD InitFieldMap(nsIImportFieldMap *fieldMap) override
{ return NS_ERROR_FAILURE;}
NS_IMETHOD ImportAddressBook(nsIImportABDescriptor *source,
@ -64,15 +64,15 @@ public:
nsISupports *aSupportService,
char16_t **errorLog,
char16_t **successLog,
bool *fatalError);
bool *fatalError) override;
NS_IMETHOD GetImportProgress(uint32_t *_retval);
NS_IMETHOD GetImportProgress(uint32_t *_retval) override;
NS_IMETHOD GetSampleData(int32_t index, bool *pFound, char16_t **pStr)
NS_IMETHOD GetSampleData(int32_t index, bool *pFound, char16_t **pStr) override
{ return NS_ERROR_FAILURE;}
NS_IMETHOD SetSampleLocation(nsIFile *)
{ return NS_ERROR_FAILURE; }
NS_IMETHOD SetSampleLocation(nsIFile *) override
{ return NS_ERROR_FAILURE; }
private:
virtual ~ImportVCardAddressImpl();

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

@ -34,7 +34,7 @@ public:
// nsMsgIncomingServer overrides
nsresult CreateRootFolderFromUri(const nsCString &serverUri,
nsIMsgFolder **rootFolder);
nsIMsgFolder **rootFolder) override;
protected:
virtual ~JaBaseCppIncomingServer() { }

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

@ -35,8 +35,8 @@ public:
// nsMsgDBFolder overrides
nsresult CreateChildFromURI(const nsCString &uri, nsIMsgFolder **folder);
nsresult GetDatabase();
nsresult CreateChildFromURI(const nsCString &uri, nsIMsgFolder **folder) override;
nsresult GetDatabase() override;
// Local Utility Functions

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

@ -39,8 +39,8 @@ public:
JaBaseCppUrl() { }
// nsIMsgMailNewsUrl overrides
NS_IMETHOD GetFolder(nsIMsgFolder **aFolder);
NS_IMETHOD SetFolder(nsIMsgFolder *aFolder);
NS_IMETHOD GetFolder(nsIMsgFolder **aFolder) override;
NS_IMETHOD SetFolder(nsIMsgFolder *aFolder) override;
protected:
virtual ~JaBaseCppUrl() { }

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

@ -42,7 +42,7 @@ public:
m_mailboxAction = aAction;
return NS_OK;
}
NS_IMETHOD IsUrlType(uint32_t type, bool *isType);
NS_IMETHOD IsUrlType(uint32_t type, bool *isType) override;
NS_IMETHOD SetMoveCopyMsgKeys(nsMsgKey *keysToFlag, int32_t numKeys) override;
NS_IMETHOD GetMoveCopyMsgHdrForIndex(uint32_t msgIndex, nsIMsgDBHdr **msgHdr) override;
NS_IMETHOD GetNumMoveCopyMsgs(uint32_t *numMsgs) override;
@ -58,7 +58,7 @@ public:
return NS_OK;
}
NS_IMETHOD GetFolder(nsIMsgFolder **msgFolder);
NS_IMETHOD GetFolder(nsIMsgFolder **msgFolder) override;
// nsIMsgMailNewsUrl override
NS_IMETHOD CloneInternal(uint32_t aRefHandlingMode,

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

@ -302,7 +302,7 @@ nsMsgLocalStoreUtils::DiskSpaceAvailableInStore(nsIFile *aFile, uint64_t aSpaceR
nsresult rv = aFile->GetDiskSpaceAvailable(&diskFree);
if (NS_SUCCEEDED(rv)) {
#ifdef DEBUG
printf("GetDiskSpaceAvailable returned: %lld bytes\n", diskFree);
printf("GetDiskSpaceAvailable returned: %lld bytes\n", (long long)diskFree);
#endif
// When checking for disk space available, take into consideration
// possible database changes, therefore ask for a little more

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

@ -60,6 +60,7 @@
#include "mozilla/Services.h"
#include "nsQueryObject.h"
#include "nsIOutputStream.h"
#include "mozilla/Attributes.h"
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
@ -2040,7 +2041,7 @@ NS_IMETHODIMP nsParseNewMailState::ApplyFilterHit(nsIMsgFilter *filter, nsIMsgWi
}
// FALLTHROUGH
MOZ_FALLTHROUGH;
case nsMsgFilterAction::MoveToFolder:
// if moving to a different file, do it.
if (actionTargetFolderUri.get() && !m_inboxUri.Equals(actionTargetFolderUri,

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

@ -153,7 +153,7 @@ public:
virtual void AbortNewHeader();
// for nsMsgLineBuffer
virtual nsresult HandleLine(const char *line, uint32_t line_length);
virtual nsresult HandleLine(const char *line, uint32_t line_length) override;
void UpdateDBFolderInfo();
void UpdateDBFolderInfo(nsIMsgDatabase *mailDB);

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

@ -45,6 +45,7 @@
#include "nsCRT.h"
#include "mozilla/Services.h"
#include "mozilla/Logging.h"
#include "mozilla/Attributes.h"
using namespace mozilla;
@ -1629,6 +1630,7 @@ void nsPop3Protocol::InitPrefAuthMethods(int32_t authMethodPrefValue)
MOZ_LOG(POP3LOGMODULE, LogLevel::Error,
(POP3LOG("POP: bad pref authMethod = %d\n"), authMethodPrefValue));
// fall to any
MOZ_FALLTHROUGH;
case nsMsgAuthMethod::anything:
m_prefAuthMethods = POP3_HAS_AUTH_USER |
POP3_HAS_AUTH_LOGIN | POP3_HAS_AUTH_PLAIN |
@ -1791,6 +1793,7 @@ int32_t nsPop3Protocol::ProcessAuth()
break;
case POP3_HAS_AUTH_CRAM_MD5:
MOZ_LOG(POP3LOGMODULE, LogLevel::Debug, (POP3LOG("POP CRAM")));
MOZ_FALLTHROUGH;
case POP3_HAS_AUTH_PLAIN:
case POP3_HAS_AUTH_USER:
MOZ_LOG(POP3LOGMODULE, LogLevel::Debug, (POP3LOG("POP username")));

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

@ -15,7 +15,7 @@
#include "nsMimeStringResources.h"
#include "mimemoz2.h"
#include "nsIMimeConverter.h" // for MimeConverterOutputCallback
#include "mozilla/Attributes.h"
#define MIME_SUPERCLASS mimeMultipartClass
MimeDefClass(MimeMultipartSigned, MimeMultipartSignedClass,
@ -253,7 +253,7 @@ MimeMultipartSigned_parse_line (const char *line, int32_t length, MimeObject *ob
mult->hdrs = 0;
/* fall through. */
MOZ_FALLTHROUGH;
case MimeMultipartSignedBodyFirstHeader:
case MimeMultipartSignedBodyHeaders:
case MimeMultipartSignedBodyLine:
@ -403,7 +403,7 @@ MimeMultipartSigned_parse_line (const char *line, int32_t length, MimeObject *ob
}
/* fall through. */
MOZ_FALLTHROUGH;
case MimeMultipartSignedSignatureLine:
if (hash_line_p)
{
@ -494,7 +494,7 @@ MimeMultipartSigned_parse_child_line (MimeObject *obj,
case MimeMultipartSignedBodyHeaders:
// How'd we get here? Oh well, fall through.
NS_ERROR("wrong state in parse child line");
MOZ_FALLTHROUGH;
case MimeMultipartSignedBodyFirstLine:
PR_ASSERT(first_line_p);
if (!sig->part_buffer)
@ -504,7 +504,7 @@ MimeMultipartSigned_parse_child_line (MimeObject *obj,
return MIME_OUT_OF_MEMORY;
}
/* fall through */
MOZ_FALLTHROUGH;
case MimeMultipartSignedBodyLine:
{
/* This is the first part; we are buffering it, and will emit it all
@ -548,7 +548,7 @@ MimeMultipartSigned_parse_child_line (MimeObject *obj,
case MimeMultipartSignedSignatureHeaders:
// How'd we get here? Oh well, fall through.
NS_ERROR("should have already parse sig hdrs");
MOZ_FALLTHROUGH;
case MimeMultipartSignedSignatureFirstLine:
case MimeMultipartSignedSignatureLine:
/* Nothing to do here -- hashing of the signature part is handled up

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

@ -47,7 +47,7 @@ private:
nsresult CommonAsyncVerifySignature(nsISMimeVerificationListener *aListener,
unsigned char* aDigestData, uint32_t aDigestDataLen);
virtual void virtualDestroyNSSReference();
virtual void virtualDestroyNSSReference() override;
void destructorSafeDestroyNSSReference();
};
@ -73,7 +73,7 @@ private:
virtual ~nsCMSDecoder();
nsCOMPtr<nsIInterfaceRequestor> m_ctx;
NSSCMSDecoderContext *m_dcx;
virtual void virtualDestroyNSSReference();
virtual void virtualDestroyNSSReference() override;
void destructorSafeDestroyNSSReference();
};
@ -97,7 +97,7 @@ private:
virtual ~nsCMSEncoder();
nsCOMPtr<nsIInterfaceRequestor> m_ctx;
NSSCMSEncoderContext *m_ecx;
virtual void virtualDestroyNSSReference();
virtual void virtualDestroyNSSReference() override;
void destructorSafeDestroyNSSReference();
};

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

@ -165,14 +165,14 @@ public:
NS_DECL_ISUPPORTS
NS_IMETHOD GetContentType(char **contentType)
NS_IMETHOD GetContentType(char **contentType) override
{
*contentType = ToNewCString(mContentType);
return *contentType ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}
NS_IMETHOD CreateContentTypeHandlerClass(const char *contentType,
contentTypeHandlerInitStruct *initString,
MimeObjectClass **objClass);
MimeObjectClass **objClass) override;
private:
virtual ~nsSimpleMimeConverterStub() { }
nsCString mContentType;

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

@ -26,6 +26,7 @@
#include "mozilla/Logging.h"
#include "prerror.h"
#include "nsStringGlue.h"
#include "mozilla/Attributes.h"
#include "mozilla/Services.h"
#include "mozilla/mailnews/MimeHeaderParser.h"
@ -4579,10 +4580,12 @@ nsresult nsNNTPProtocol::ProcessProtocolState(nsIURI * url, nsIInputStream * inp
FinishMemCacheEntry(false); // cleanup mem cache entry
if (m_responseCode != MK_NNTP_RESPONSE_ARTICLE_NOTFOUND && m_responseCode != MK_NNTP_RESPONSE_ARTICLE_NONEXIST)
return CloseConnection();
MOZ_FALLTHROUGH;
case NEWS_FREE:
// Remember when we last used this connection
m_lastActiveTimeStamp = PR_Now();
CleanupAfterRunningUrl();
MOZ_FALLTHROUGH;
case NNTP_SUSPENDED:
return NS_OK;
break;

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

@ -139,18 +139,18 @@ public:
nsIMsgWindow *aMsgWindow);
// stop binding is a "notification" informing us that the stream associated with aURL is going away.
NS_IMETHOD OnStopRequest(nsIRequest *request, nsISupports * aCtxt, nsresult aStatus);
NS_IMETHOD OnStopRequest(nsIRequest *request, nsISupports * aCtxt, nsresult aStatus) override;
char * m_ProxyServer; /* proxy server hostname */
NS_IMETHOD Cancel(nsresult status); // handle stop button
NS_IMETHOD GetContentType(nsACString &aContentType);
NS_IMETHOD AsyncOpen(nsIStreamListener *listener, nsISupports *ctxt);
NS_IMETHOD AsyncOpen2(nsIStreamListener *listener);
NS_IMETHOD GetOriginalURI(nsIURI* *aURI);
NS_IMETHOD SetOriginalURI(nsIURI* aURI);
NS_IMETHOD Cancel(nsresult status) override; // handle stop button
NS_IMETHOD GetContentType(nsACString &aContentType) override;
NS_IMETHOD AsyncOpen(nsIStreamListener *listener, nsISupports *ctxt) override;
NS_IMETHOD AsyncOpen2(nsIStreamListener *listener) override;
NS_IMETHOD GetOriginalURI(nsIURI* *aURI) override;
NS_IMETHOD SetOriginalURI(nsIURI* aURI) override;
nsresult LoadUrl(nsIURI * aURL, nsISupports * aConsumer);
nsresult LoadUrl(nsIURI * aURL, nsISupports * aConsumer) override;
private:
virtual ~nsNNTPProtocol();
@ -173,19 +173,19 @@ private:
* advised to suspend the request before using this state.
*/
virtual nsresult ProcessProtocolState(nsIURI * url, nsIInputStream * inputStream,
uint64_t sourceOffset, uint32_t length);
virtual nsresult CloseSocket();
uint64_t sourceOffset, uint32_t length) override;
virtual nsresult CloseSocket() override;
// we have our own implementation of SendData which writes to the nntp log
// and then calls the base class to transmit the data
nsresult SendData(const char * dataBuffer, bool aSuppressLogging = false);
nsresult SendData(const char * dataBuffer, bool aSuppressLogging = false) override;
nsresult CleanupAfterRunningUrl();
void Cleanup(); //free char* member variables
void ParseHeaderForCancel(char *buf);
virtual const char* GetType() {return "nntp";}
virtual const char* GetType() override { return "nntp"; }
static void CheckIfAuthor(nsIMsgIdentity *aIdentity, const nsCString &aOldFrom, nsCString &aFrom);

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

@ -50,34 +50,34 @@ public:
NS_IMETHOD GetLocalStoreType(nsACString& type) override;
NS_IMETHOD GetLocalDatabaseType(nsACString& type) override;
NS_IMETHOD CloseCachedConnections();
NS_IMETHOD PerformBiff(nsIMsgWindow *aMsgWindow);
NS_IMETHOD PerformExpand(nsIMsgWindow *aMsgWindow);
NS_IMETHOD CloseCachedConnections() override;
NS_IMETHOD PerformBiff(nsIMsgWindow *aMsgWindow) override;
NS_IMETHOD PerformExpand(nsIMsgWindow *aMsgWindow) override;
NS_IMETHOD OnUserOrHostNameChanged(const nsACString& oldName,
const nsACString& newName,
bool hostnameChanged);
bool hostnameChanged) override;
// for nsMsgLineBuffer
virtual nsresult HandleLine(const char *line, uint32_t line_size);
// override to clear all passwords associated with server
NS_IMETHODIMP ForgetPassword();
NS_IMETHOD GetCanSearchMessages(bool *canSearchMessages);
NS_IMETHOD GetOfflineSupportLevel(int32_t *aSupportLevel);
NS_IMETHOD GetDefaultCopiesAndFoldersPrefsToServer(bool *aCopiesAndFoldersOnServer);
NS_IMETHOD GetCanCreateFoldersOnServer(bool *aCanCreateFoldersOnServer);
NS_IMETHOD GetCanFileMessagesOnServer(bool *aCanFileMessagesOnServer);
NS_IMETHOD GetFilterScope(nsMsgSearchScopeValue *filterScope);
NS_IMETHOD GetSearchScope(nsMsgSearchScopeValue *searchScope);
NS_IMETHODIMP ForgetPassword() override;
NS_IMETHOD GetCanSearchMessages(bool *canSearchMessages) override;
NS_IMETHOD GetOfflineSupportLevel(int32_t *aSupportLevel) override;
NS_IMETHOD GetDefaultCopiesAndFoldersPrefsToServer(bool *aCopiesAndFoldersOnServer) override;
NS_IMETHOD GetCanCreateFoldersOnServer(bool *aCanCreateFoldersOnServer) override;
NS_IMETHOD GetCanFileMessagesOnServer(bool *aCanFileMessagesOnServer) override;
NS_IMETHOD GetFilterScope(nsMsgSearchScopeValue *filterScope) override;
NS_IMETHOD GetSearchScope(nsMsgSearchScopeValue *searchScope) override;
NS_IMETHOD GetSocketType(int32_t *aSocketType); // override nsMsgIncomingServer impl
NS_IMETHOD SetSocketType(int32_t aSocketType); // override nsMsgIncomingServer impl
NS_IMETHOD GetSortOrder(int32_t* aSortOrder);
NS_IMETHOD GetSocketType(int32_t *aSocketType) override; // override nsMsgIncomingServer impl
NS_IMETHOD SetSocketType(int32_t aSocketType) override; // override nsMsgIncomingServer impl
NS_IMETHOD GetSortOrder(int32_t* aSortOrder) override;
protected:
virtual ~nsNntpIncomingServer();
virtual nsresult CreateRootFolderFromUri(const nsCString &serverUri,
nsIMsgFolder **rootFolder);
nsIMsgFolder **rootFolder) override;
nsresult GetNntpConnection(nsIURI *url, nsIMsgWindow *window,
nsINNTPProtocol **aNntpConnection);
nsresult CreateProtocolInstance(nsINNTPProtocol **aNntpConnection,
@ -91,7 +91,7 @@ protected:
*/
nsresult DownloadMail(nsIMsgWindow *aMsgWindow);
NS_IMETHOD GetServerRequiresPasswordForBiff(bool *aServerRequiresPasswordForBiff);
NS_IMETHOD GetServerRequiresPasswordForBiff(bool *aServerRequiresPasswordForBiff) override;
nsresult SetupNewsrcSaveTimer();
static void OnNewsrcSaveTimer(nsITimer *timer, void *voidIncomingServer);
void WriteLine(nsIOutputStream *stream, nsCString &str);

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

@ -19,15 +19,15 @@ public:
NS_DECL_NSIMSGI18NURL
// nsIURI over-ride...
NS_IMETHOD SetSpec(const nsACString &aSpec);
NS_IMETHOD SetSpec(const nsACString &aSpec) override;
NS_IMETHOD IsUrlType(uint32_t type, bool *isType);
NS_IMETHOD IsUrlType(uint32_t type, bool *isType) override;
// nsIMsgMailNewsUrl overrides
NS_IMETHOD GetServer(nsIMsgIncomingServer **server);
NS_IMETHOD GetFolder(nsIMsgFolder **msgFolder);
NS_IMETHOD GetServer(nsIMsgIncomingServer **server) override;
NS_IMETHOD GetFolder(nsIMsgFolder **msgFolder) override;
NS_IMETHOD CloneInternal(uint32_t aRefHandlingMode,
const nsACString& newRef,nsIURI **_retval);
const nsACString& newRef,nsIURI **_retval) override;
// nsNntpUrl
nsNntpUrl();