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/base | |
parent | 4db1ae892bad565e8e59ec6034b4c98946077248 (diff) | |
download | UXP-201683afe4596ae32f7b1ea12dfca52995d59f9d.tar UXP-201683afe4596ae32f7b1ea12dfca52995d59f9d.tar.gz UXP-201683afe4596ae32f7b1ea12dfca52995d59f9d.tar.lz UXP-201683afe4596ae32f7b1ea12dfca52995d59f9d.tar.xz UXP-201683afe4596ae32f7b1ea12dfca52995d59f9d.zip |
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/base')
-rw-r--r-- | mailnews/base/search/public/nsMsgResultElement.h | 2 | ||||
-rw-r--r-- | mailnews/base/search/public/nsMsgSearchBoolExpression.h | 2 | ||||
-rw-r--r-- | mailnews/base/search/src/nsMsgSearchValue.h | 2 | ||||
-rw-r--r-- | mailnews/base/src/nsMailDirProvider.h | 2 | ||||
-rw-r--r-- | mailnews/base/src/nsMsgCopyService.h | 2 | ||||
-rw-r--r-- | mailnews/base/src/nsMsgDBView.h | 2 | ||||
-rw-r--r-- | mailnews/base/src/nsMsgGroupThread.h | 2 | ||||
-rw-r--r-- | mailnews/base/src/nsMsgPrintEngine.cpp | 4 | ||||
-rw-r--r-- | mailnews/base/util/nsMsgKeySet.h | 2 | ||||
-rw-r--r-- | mailnews/base/util/nsMsgLineBuffer.h | 2 |
10 files changed, 11 insertions, 11 deletions
diff --git a/mailnews/base/search/public/nsMsgResultElement.h b/mailnews/base/search/public/nsMsgResultElement.h index 384436299..f8cdf4404 100644 --- a/mailnews/base/search/public/nsMsgResultElement.h +++ b/mailnews/base/search/public/nsMsgResultElement.h @@ -20,7 +20,7 @@ class nsMsgResultElement { public: - nsMsgResultElement (nsIMsgSearchAdapter *); + explicit nsMsgResultElement (nsIMsgSearchAdapter *); virtual ~nsMsgResultElement (); static nsresult AssignValues (nsIMsgSearchValue *src, nsMsgSearchValue *dst); diff --git a/mailnews/base/search/public/nsMsgSearchBoolExpression.h b/mailnews/base/search/public/nsMsgSearchBoolExpression.h index c65e5c24a..9c6a9c8d8 100644 --- a/mailnews/base/search/public/nsMsgSearchBoolExpression.h +++ b/mailnews/base/search/public/nsMsgSearchBoolExpression.h @@ -41,7 +41,7 @@ class nsMsgSearchBoolExpression public: // create a leaf node expression - nsMsgSearchBoolExpression(nsIMsgSearchTerm * aNewTerm, + explicit nsMsgSearchBoolExpression(nsIMsgSearchTerm * aNewTerm, char * aEncodingString = NULL); // create a non-leaf node expression containing 2 expressions diff --git a/mailnews/base/search/src/nsMsgSearchValue.h b/mailnews/base/search/src/nsMsgSearchValue.h index ef50ad1ed..3d08d27fa 100644 --- a/mailnews/base/search/src/nsMsgSearchValue.h +++ b/mailnews/base/search/src/nsMsgSearchValue.h @@ -11,7 +11,7 @@ class nsMsgSearchValueImpl : public nsIMsgSearchValue { public: - nsMsgSearchValueImpl(nsMsgSearchValue *aInitialValue); + explicit nsMsgSearchValueImpl(nsMsgSearchValue *aInitialValue); NS_DECL_ISUPPORTS NS_DECL_NSIMSGSEARCHVALUE diff --git a/mailnews/base/src/nsMailDirProvider.h b/mailnews/base/src/nsMailDirProvider.h index d12876d89..613551a79 100644 --- a/mailnews/base/src/nsMailDirProvider.h +++ b/mailnews/base/src/nsMailDirProvider.h @@ -29,7 +29,7 @@ private: NS_DECL_ISUPPORTS NS_DECL_NSISIMPLEENUMERATOR - AppendingEnumerator(nsISimpleEnumerator* aBase); + explicit AppendingEnumerator(nsISimpleEnumerator* aBase); private: ~AppendingEnumerator() {} diff --git a/mailnews/base/src/nsMsgCopyService.h b/mailnews/base/src/nsMsgCopyService.h index dfb9acc7a..8df9ccff5 100644 --- a/mailnews/base/src/nsMsgCopyService.h +++ b/mailnews/base/src/nsMsgCopyService.h @@ -29,7 +29,7 @@ class nsCopySource { public: nsCopySource(); - nsCopySource(nsIMsgFolder* srcFolder); + explicit nsCopySource(nsIMsgFolder* srcFolder); ~nsCopySource(); void AddMessage(nsIMsgDBHdr* aMsg); diff --git a/mailnews/base/src/nsMsgDBView.h b/mailnews/base/src/nsMsgDBView.h index 6dcbbea3b..feba5f14f 100644 --- a/mailnews/base/src/nsMsgDBView.h +++ b/mailnews/base/src/nsMsgDBView.h @@ -500,7 +500,7 @@ private: NS_DECL_NSISIMPLEENUMERATOR // nsMsgThreadEnumerator methods: - nsMsgViewHdrEnumerator(nsMsgDBView *view); + explicit nsMsgViewHdrEnumerator(nsMsgDBView *view); RefPtr<nsMsgDBView> m_view; nsMsgViewIndex m_curHdrIndex; diff --git a/mailnews/base/src/nsMsgGroupThread.h b/mailnews/base/src/nsMsgGroupThread.h index 3d1cb4fb4..076d7432a 100644 --- a/mailnews/base/src/nsMsgGroupThread.h +++ b/mailnews/base/src/nsMsgGroupThread.h @@ -21,7 +21,7 @@ public: friend class nsMsgGroupView; nsMsgGroupThread(); - nsMsgGroupThread(nsIMsgDatabase *db); + explicit nsMsgGroupThread(nsIMsgDatabase *db); NS_DECL_NSIMSGTHREAD NS_DECL_ISUPPORTS diff --git a/mailnews/base/src/nsMsgPrintEngine.cpp b/mailnews/base/src/nsMsgPrintEngine.cpp index d2f8157ed..2a509f380 100644 --- a/mailnews/base/src/nsMsgPrintEngine.cpp +++ b/mailnews/base/src/nsMsgPrintEngine.cpp @@ -653,7 +653,7 @@ nsMsgPrintEngine::PrintMsgWindow() class nsPrintMsgWindowEvent : public mozilla::Runnable { public: - nsPrintMsgWindowEvent(nsMsgPrintEngine *mpe) + explicit nsPrintMsgWindowEvent(nsMsgPrintEngine *mpe) : mMsgPrintEngine(mpe) {} @@ -672,7 +672,7 @@ private: class nsStartNextPrintOpEvent : public mozilla::Runnable { public: - nsStartNextPrintOpEvent(nsMsgPrintEngine *mpe) + explicit nsStartNextPrintOpEvent(nsMsgPrintEngine *mpe) : mMsgPrintEngine(mpe) {} diff --git a/mailnews/base/util/nsMsgKeySet.h b/mailnews/base/util/nsMsgKeySet.h index c33306ad8..f38dbd013 100644 --- a/mailnews/base/util/nsMsgKeySet.h +++ b/mailnews/base/util/nsMsgKeySet.h @@ -80,7 +80,7 @@ public: protected: nsMsgKeySet(/* MSG_NewsHost* host */); - nsMsgKeySet(const char* /* , MSG_NewsHost* host */); + explicit nsMsgKeySet(const char* /* , MSG_NewsHost* host */); bool Grow(); bool Optimize(); diff --git a/mailnews/base/util/nsMsgLineBuffer.h b/mailnews/base/util/nsMsgLineBuffer.h index 0383b2d43..eff3f7c7e 100644 --- a/mailnews/base/util/nsMsgLineBuffer.h +++ b/mailnews/base/util/nsMsgLineBuffer.h @@ -50,7 +50,7 @@ public: // flush last line, though it won't be CRLF terminated. virtual nsresult FlushLastLine(); protected: - nsMsgLineBuffer(bool convertNewlinesP); + explicit nsMsgLineBuffer(bool convertNewlinesP); nsresult ConvertAndSendBuffer(); void SetLookingForCRLF(bool b); |