diff options
author | Matt A. Tobin <email@mattatobin.com> | 2019-11-10 19:11:03 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2019-11-10 19:11:03 -0500 |
commit | 201683afe4596ae32f7b1ea12dfca52995d59f9d (patch) | |
tree | 8632173f59a85d1c3bf679653de7957a59c96eae /mailnews/imap/src | |
parent | 4db1ae892bad565e8e59ec6034b4c98946077248 (diff) | |
download | uxp-201683afe4596ae32f7b1ea12dfca52995d59f9d.tar.gz |
Bug 1487082 - Resolve potential for build bustage regarding bad implicit conversion constructors
* Part 1: make conversion CTORs explicit.
Minor tweaks to conform with new(ish) static analysis rule which flags up implicit single-argument conversion constructors.
* Part 2: fix a couple of double-mRefCnt declaration errors.
* Part 3: Fix unsafe use of NS_ConvertASCIItoUTF16().
Tag #1273
Diffstat (limited to 'mailnews/imap/src')
-rw-r--r-- | mailnews/imap/src/nsAutoSyncState.h | 2 | ||||
-rw-r--r-- | mailnews/imap/src/nsImapFlagAndUidState.h | 2 | ||||
-rw-r--r-- | mailnews/imap/src/nsImapMailFolder.cpp | 2 | ||||
-rw-r--r-- | mailnews/imap/src/nsImapMailFolder.h | 2 | ||||
-rw-r--r-- | mailnews/imap/src/nsImapProtocol.cpp | 4 | ||||
-rw-r--r-- | mailnews/imap/src/nsImapSearchResults.h | 2 | ||||
-rw-r--r-- | mailnews/imap/src/nsImapServerResponseParser.h | 2 | ||||
-rw-r--r-- | mailnews/imap/src/nsSyncRunnableHelpers.h | 10 |
8 files changed, 13 insertions, 13 deletions
diff --git a/mailnews/imap/src/nsAutoSyncState.h b/mailnews/imap/src/nsAutoSyncState.h index c28c10d60e..0b10c8c948 100644 --- a/mailnews/imap/src/nsAutoSyncState.h +++ b/mailnews/imap/src/nsAutoSyncState.h @@ -56,7 +56,7 @@ public: NS_DECL_NSIAUTOSYNCSTATE NS_DECL_NSIURLLISTENER - nsAutoSyncState(nsImapMailFolder *aOwnerFolder, PRTime aLastSyncTime = 0UL); + explicit nsAutoSyncState(nsImapMailFolder *aOwnerFolder, PRTime aLastSyncTime = 0UL); /// Called by owner folder when new headers are fetched from the server void OnNewHeaderFetchCompleted(const nsTArray<nsMsgKey> &aMsgKeyList); diff --git a/mailnews/imap/src/nsImapFlagAndUidState.h b/mailnews/imap/src/nsImapFlagAndUidState.h index 6bf5f3fbe0..259bc016fa 100644 --- a/mailnews/imap/src/nsImapFlagAndUidState.h +++ b/mailnews/imap/src/nsImapFlagAndUidState.h @@ -20,7 +20,7 @@ class nsImapFlagAndUidState : public nsIImapFlagAndUidState { public: NS_DECL_THREADSAFE_ISUPPORTS - nsImapFlagAndUidState(int numberOfMessages); + explicit nsImapFlagAndUidState(int numberOfMessages); NS_DECL_NSIIMAPFLAGANDUIDSTATE diff --git a/mailnews/imap/src/nsImapMailFolder.cpp b/mailnews/imap/src/nsImapMailFolder.cpp index 12e6873601..4ed12a0264 100644 --- a/mailnews/imap/src/nsImapMailFolder.cpp +++ b/mailnews/imap/src/nsImapMailFolder.cpp @@ -6363,7 +6363,7 @@ NS_IMETHODIMP nsImapMailFolder::GetOtherUsersWithAccess( class AdoptUTF8StringEnumerator final : public nsIUTF8StringEnumerator { public: - AdoptUTF8StringEnumerator(nsTArray<nsCString>* array) : + explicit AdoptUTF8StringEnumerator(nsTArray<nsCString>* array) : mStrings(array), mIndex(0) {} diff --git a/mailnews/imap/src/nsImapMailFolder.h b/mailnews/imap/src/nsImapMailFolder.h index b2a9430b36..71665ee79b 100644 --- a/mailnews/imap/src/nsImapMailFolder.h +++ b/mailnews/imap/src/nsImapMailFolder.h @@ -115,7 +115,7 @@ class nsImapMailFolder; class nsMsgIMAPFolderACL { public: - nsMsgIMAPFolderACL(nsImapMailFolder *folder); + explicit nsMsgIMAPFolderACL(nsImapMailFolder *folder); ~nsMsgIMAPFolderACL(); bool SetFolderRightsForUser(const nsACString& userName, const nsACString& rights); diff --git a/mailnews/imap/src/nsImapProtocol.cpp b/mailnews/imap/src/nsImapProtocol.cpp index 1d0c98d48b..bf00e02065 100644 --- a/mailnews/imap/src/nsImapProtocol.cpp +++ b/mailnews/imap/src/nsImapProtocol.cpp @@ -1057,7 +1057,7 @@ void nsImapProtocol::ReleaseUrlState(bool rerunning) class nsImapThreadShutdownEvent : public mozilla::Runnable { public: - nsImapThreadShutdownEvent(nsIThread *thread) : mThread(thread) { + explicit nsImapThreadShutdownEvent(nsIThread *thread) : mThread(thread) { } NS_IMETHOD Run() { mThread->Shutdown(); @@ -9580,7 +9580,7 @@ nsresult nsImapMockChannel::ReadFromMemCache(nsICacheEntry *entry) class nsReadFromImapConnectionFailure : public mozilla::Runnable { public: - nsReadFromImapConnectionFailure(nsImapMockChannel *aChannel) + explicit nsReadFromImapConnectionFailure(nsImapMockChannel *aChannel) : mImapMockChannel(aChannel) {} diff --git a/mailnews/imap/src/nsImapSearchResults.h b/mailnews/imap/src/nsImapSearchResults.h index b4333417b1..b03268d4df 100644 --- a/mailnews/imap/src/nsImapSearchResults.h +++ b/mailnews/imap/src/nsImapSearchResults.h @@ -25,7 +25,7 @@ private: class nsImapSearchResultIterator { public: - nsImapSearchResultIterator(nsImapSearchResultSequence &sequence); + explicit nsImapSearchResultIterator(nsImapSearchResultSequence &sequence); virtual ~nsImapSearchResultIterator(); void ResetIterator(); diff --git a/mailnews/imap/src/nsImapServerResponseParser.h b/mailnews/imap/src/nsImapServerResponseParser.h index 5b46f8a43e..fb5762b6b4 100644 --- a/mailnews/imap/src/nsImapServerResponseParser.h +++ b/mailnews/imap/src/nsImapServerResponseParser.h @@ -28,7 +28,7 @@ class nsCString; class nsImapServerResponseParser : public nsIMAPGenericParser { public: - nsImapServerResponseParser(nsImapProtocol &imapConnection); + explicit nsImapServerResponseParser(nsImapProtocol &imapConnection); virtual ~nsImapServerResponseParser(); // Overridden from the base parser class diff --git a/mailnews/imap/src/nsSyncRunnableHelpers.h b/mailnews/imap/src/nsSyncRunnableHelpers.h index 4740fab102..273810a70b 100644 --- a/mailnews/imap/src/nsSyncRunnableHelpers.h +++ b/mailnews/imap/src/nsSyncRunnableHelpers.h @@ -27,7 +27,7 @@ class StreamListenerProxy final : public nsIStreamListener { public: - StreamListenerProxy(nsIStreamListener* receiver) + explicit StreamListenerProxy(nsIStreamListener* receiver) : mReceiver(receiver) { } @@ -45,7 +45,7 @@ private: class ImapMailFolderSinkProxy final : public nsIImapMailFolderSink { public: - ImapMailFolderSinkProxy(nsIImapMailFolderSink* receiver) + explicit ImapMailFolderSinkProxy(nsIImapMailFolderSink* receiver) : mReceiver(receiver) { NS_ASSERTION(receiver, "Don't allow receiver is nullptr"); @@ -64,7 +64,7 @@ private: class ImapServerSinkProxy final : public nsIImapServerSink { public: - ImapServerSinkProxy(nsIImapServerSink* receiver) + explicit ImapServerSinkProxy(nsIImapServerSink* receiver) : mReceiver(receiver) { } @@ -82,7 +82,7 @@ private: class ImapMessageSinkProxy final : public nsIImapMessageSink { public: - ImapMessageSinkProxy(nsIImapMessageSink* receiver) + explicit ImapMessageSinkProxy(nsIImapMessageSink* receiver) : mReceiver(receiver) { } @@ -99,7 +99,7 @@ private: class ImapProtocolSinkProxy final : public nsIImapProtocolSink { public: - ImapProtocolSinkProxy(nsIImapProtocolSink* receiver) + explicit ImapProtocolSinkProxy(nsIImapProtocolSink* receiver) : mReceiver(receiver) { } |