Bug 1370357 - fix uninitialized variable in nsImapMailFolder.cpp and nsAbCardProperty.cpp. r=jorgk BETA_BASE_20170612
authoraceman <acelists@atlas.sk>
Wed, 07 Jun 2017 14:59:00 +0200
changeset 21660 58ce0f54ddab67ebe71e36035bb4a102d68fc084
parent 21659 69cff0b91c931f7af4270ce3ae057c577f037e87
child 21661 c6c80e35c5591c9065382425b5cca3d17db7eb97
push id13202
push usermozilla@jorgk.com
push dateMon, 12 Jun 2017 13:07:00 +0000
treeherdercomm-central@58ce0f54ddab [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorgk
bugs1370357
Bug 1370357 - fix uninitialized variable in nsImapMailFolder.cpp and nsAbCardProperty.cpp. r=jorgk
mailnews/addrbook/src/nsAbCardProperty.cpp
mailnews/imap/src/nsImapMailFolder.cpp
--- a/mailnews/addrbook/src/nsAbCardProperty.cpp
+++ b/mailnews/addrbook/src/nsAbCardProperty.cpp
@@ -32,17 +32,18 @@ using namespace mozilla;
 
 #define PREF_MAIL_ADDR_BOOK_LASTNAMEFIRST "mail.addr_book.lastnamefirst"
 
 const char sAddrbookProperties[] = "chrome://messenger/locale/addressbook/addressBook.properties";
 
 enum EAppendType {
   eAppendLine,
   eAppendLabel,
-  eAppendCityStateZip
+  eAppendCityStateZip,
+  eAppendUndefined
 };
 
 struct AppendItem {
   const char *mColumn;
   const char* mLabel;
   EAppendType mAppendType;
 };
 
@@ -1028,16 +1029,17 @@ nsresult nsAbCardProperty::AppendCitySta
 
   nsAutoString cityResult, stateResult, zipResult;
 
   rv = AppendLine(aItem, aConv, cityResult);
   NS_ENSURE_SUCCESS(rv,rv);
 
   item.mColumn = statePropName;
   item.mLabel = "";
+  item.mAppendType = eAppendUndefined;
 
   rv = AppendLine(item, aConv, stateResult);
   NS_ENSURE_SUCCESS(rv,rv);
 
   item.mColumn = zipPropName;
 
   rv = AppendLine(item, aConv, zipResult);
   NS_ENSURE_SUCCESS(rv,rv);
--- a/mailnews/imap/src/nsImapMailFolder.cpp
+++ b/mailnews/imap/src/nsImapMailFolder.cpp
@@ -5386,17 +5386,17 @@ nsImapMailFolder::OnStopRunningUrl(nsIUR
               {
                 nsTArray<nsMsgKey> keyArray;
                 nsCString keyString;
                 imapUrl->GetListOfMessageIds(keyString);
                 ParseUidString(keyString.get(), keyArray);
 
                 // For pluggable stores that do not support compaction, we need
                 // to delete the messages now.
-                bool supportsCompaction;
+                bool supportsCompaction = false;
                 uint32_t numHdrs = 0;
                 nsCOMPtr<nsIMsgPluggableStore> offlineStore;
                 (void) GetMsgStore(getter_AddRefs(offlineStore));
                 if (offlineStore)
                   offlineStore->GetSupportsCompaction(&supportsCompaction);
 
                 nsCOMPtr<nsIMutableArray> msgHdrs;
                 if (notifier || !supportsCompaction)