summaryrefslogtreecommitdiff
path: root/mailnews/base
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-11-10 19:11:03 -0500
committerMatt A. Tobin <email@mattatobin.com>2019-11-10 19:11:03 -0500
commit201683afe4596ae32f7b1ea12dfca52995d59f9d (patch)
tree8632173f59a85d1c3bf679653de7957a59c96eae /mailnews/base
parent4db1ae892bad565e8e59ec6034b4c98946077248 (diff)
downloaduxp-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/base')
-rw-r--r--mailnews/base/search/public/nsMsgResultElement.h2
-rw-r--r--mailnews/base/search/public/nsMsgSearchBoolExpression.h2
-rw-r--r--mailnews/base/search/src/nsMsgSearchValue.h2
-rw-r--r--mailnews/base/src/nsMailDirProvider.h2
-rw-r--r--mailnews/base/src/nsMsgCopyService.h2
-rw-r--r--mailnews/base/src/nsMsgDBView.h2
-rw-r--r--mailnews/base/src/nsMsgGroupThread.h2
-rw-r--r--mailnews/base/src/nsMsgPrintEngine.cpp4
-rw-r--r--mailnews/base/util/nsMsgKeySet.h2
-rw-r--r--mailnews/base/util/nsMsgLineBuffer.h2
10 files changed, 11 insertions, 11 deletions
diff --git a/mailnews/base/search/public/nsMsgResultElement.h b/mailnews/base/search/public/nsMsgResultElement.h
index 3844362990..f8cdf4404f 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 c65e5c24a9..9c6a9c8d83 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 ef50ad1edd..3d08d27fa4 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 d12876d894..613551a79e 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 dfb9acc7a9..8df9ccff50 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 6dcbbea3b5..feba5f14fe 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 3d1cb4fb40..076d7432af 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 d2f8157edd..2a509f3808 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 c33306ad8a..f38dbd0132 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 0383b2d43e..eff3f7c7ee 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);