From 201683afe4596ae32f7b1ea12dfca52995d59f9d Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Sun, 10 Nov 2019 19:11:03 -0500 Subject: 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 --- mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp | 2 +- mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'mailnews/extensions') diff --git a/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp b/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp index 0fa5aa1e2..d0336db1d 100644 --- a/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp +++ b/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp @@ -898,7 +898,7 @@ public: NS_DECL_NSISTREAMLISTENER NS_DECL_NSIMSGHEADERSINK - TokenStreamListener(TokenAnalyzer* analyzer); + explicit TokenStreamListener(TokenAnalyzer* analyzer); protected: virtual ~TokenStreamListener(); TokenAnalyzer* mAnalyzer; diff --git a/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.h b/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.h index 32a9d26d0..a1e2beaab 100644 --- a/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.h +++ b/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.h @@ -40,7 +40,7 @@ struct CorpusToken; */ class TokenEnumeration { public: - TokenEnumeration(PLDHashTable* table); + explicit TokenEnumeration(PLDHashTable* table); bool hasMoreTokens(); BaseToken* nextToken(); @@ -96,7 +96,7 @@ public: BaseToken* add(const char* word); protected: - TokenHash(uint32_t entrySize); + explicit TokenHash(uint32_t entrySize); PLArenaPool mWordPool; uint32_t mEntrySize; PLDHashTable mTokenTable; -- cgit v1.2.3