diff --git a/Externals/crystaledit/editlib/ccrystaltextmarkers.h b/Externals/crystaledit/editlib/ccrystaltextmarkers.h index e36ff601ccf..2850cec8153 100644 --- a/Externals/crystaledit/editlib/ccrystaltextmarkers.h +++ b/Externals/crystaledit/editlib/ccrystaltextmarkers.h @@ -19,10 +19,10 @@ class CCrystalTextMarkers struct Marker { CString sFindWhat; - findtext_flags_t dwFlags; - enum COLORINDEX nBgColorIndex; - bool bUserDefined; - bool bVisible; + findtext_flags_t dwFlags = 0; + enum COLORINDEX nBgColorIndex = COLORINDEX_NONE; + bool bUserDefined = false; + bool bVisible = false; }; CCrystalTextMarkers(); diff --git a/Src/7zCommon.cpp b/Src/7zCommon.cpp index aff4d10927b..6108b49b596 100644 --- a/Src/7zCommon.cpp +++ b/Src/7zCommon.cpp @@ -341,6 +341,8 @@ SingleItemEnumerator::SingleItemEnumerator(const tchar_t* path, const tchar_t* F DirItemEnumerator::DirItemEnumerator(CDirView *pView, int nFlags) : m_pView(pView) , m_nFlags(nFlags) +, m_nIndex(-1) +, m_index(0) { if (m_nFlags & Original) { diff --git a/Src/7zCommon.h b/Src/7zCommon.h index 5c7ffc7aac9..22691aa6d96 100644 --- a/Src/7zCommon.h +++ b/Src/7zCommon.h @@ -27,7 +27,7 @@ Merge7z::Format *ArchiveGuessFormat(const String&); class CTempPathContext { public: - CTempPathContext *m_pParent; + CTempPathContext *m_pParent = nullptr; String m_strDisplayRoot[3]; String m_strRoot[3]; CTempPathContext *DeleteHead(); diff --git a/Src/Common/ExConverter.h b/Src/Common/ExConverter.h index 9dd46689aa6..e900a656d2e 100644 --- a/Src/Common/ExConverter.h +++ b/Src/Common/ExConverter.h @@ -5,11 +5,11 @@ struct CodePageInfo { - int codepage; + int codepage = 0; String desc; String proportionalFont; String fixedWidthFont; - char bGDICharset; + char bGDICharset = 0; }; struct IExconverter diff --git a/Src/Common/MessageBoxDialog.cpp b/Src/Common/MessageBoxDialog.cpp index 970d48ed33d..6a381b2b264 100644 --- a/Src/Common/MessageBoxDialog.cpp +++ b/Src/Common/MessageBoxDialog.cpp @@ -353,7 +353,7 @@ CString CMessageBoxDialog::GenerateRegistryKey(UINT nMessageID, UINT nHelpID) struct ModelessMesssageBoxParam { CString strMessage; - UINT nType; + UINT nType = 0; }; /* diff --git a/Src/Concurrent.h b/Src/Concurrent.h index ba3953712bd..c380523f39c 100644 --- a/Src/Concurrent.h +++ b/Src/Concurrent.h @@ -10,10 +10,10 @@ namespace Concurrent struct TaskParams { std::function m_func; - HANDLE m_hThread; - ResultType m_result; - bool m_detached; - bool m_completed; + HANDLE m_hThread = nullptr; + ResultType m_result{}; + bool m_detached = false; + bool m_completed = false; }; explicit Task(TaskParams *pParams) : m_pParams(pParams) diff --git a/Src/DirAdditionalPropertiesDlg.h b/Src/DirAdditionalPropertiesDlg.h index 7677fa05458..82c9da3441a 100644 --- a/Src/DirAdditionalPropertiesDlg.h +++ b/Src/DirAdditionalPropertiesDlg.h @@ -17,8 +17,8 @@ struct Node String name; String canonicalName; String displayName; - bool selected; - HTREEITEM hItem; + bool selected = false; + HTREEITEM hItem = nullptr; std::list childNodes; }; diff --git a/Src/DirSelectFilesDlg.cpp b/Src/DirSelectFilesDlg.cpp index d52e59b23a6..f4f8851eeee 100644 --- a/Src/DirSelectFilesDlg.cpp +++ b/Src/DirSelectFilesDlg.cpp @@ -125,7 +125,7 @@ void DirSelectFilesDlg::Impl::UpdateButtonCaptions() } } -DirSelectFilesDlg::DirSelectFilesDlg() : m_pimpl(new DirSelectFilesDlg::Impl(this)) {} +DirSelectFilesDlg::DirSelectFilesDlg() : m_pimpl(new DirSelectFilesDlg::Impl(this)), m_pdi{} {} DirSelectFilesDlg::~DirSelectFilesDlg() = default; int DirSelectFilesDlg::DoModal() { return static_cast(m_pimpl->DoModal()); } diff --git a/Src/DirView.cpp b/Src/DirView.cpp index 61325181d89..02c83b05ded 100644 --- a/Src/DirView.cpp +++ b/Src/DirView.cpp @@ -101,6 +101,7 @@ CDirView::CDirView() , m_pColItems(nullptr) , m_nActivePane(-1) , m_nExpandSubdirs(DO_NOT_EXPAND) + , m_bUserCancelEdit(false) { m_dwDefaultStyle &= ~LVS_TYPEMASK; // Show selection all the time, so user can see current item even when diff --git a/Src/FileActionScript.h b/Src/FileActionScript.h index e357cc2fe17..ab5b826854b 100644 --- a/Src/FileActionScript.h +++ b/Src/FileActionScript.h @@ -38,6 +38,7 @@ struct FileAction */ enum ACT_TYPE { + ACT_NONE = 0, ACT_COPY = 1, /**< Copy the item(s). */ ACT_MOVE, /**< Move the item(s). */ ACT_DEL, /**< Delete the item(s). */ @@ -46,8 +47,8 @@ struct FileAction String src; /**< Source for action */ String dest; /**< Destination action */ - bool dirflag; /**< Is it directory? (`true` means directory) */ - ACT_TYPE atype; /**< Action's type */ + bool dirflag = false; /**< Is it directory? (`true` means directory) */ + ACT_TYPE atype = ACT_NONE; /**< Action's type */ }; /** @@ -75,10 +76,10 @@ struct FileActionItem : public FileAction * This is an arbitrary value that can be used to associate the item with * other items. This can be e.g. indext of the item in the GUI. */ - int context; - int UIResult; /**< Resulting UI action */ - int UIOrigin; /**< Original UI-side */ - int UIDestination; /**< Destination UI-side */ + int context = 0; + int UIResult = 0; /**< Resulting UI action */ + int UIOrigin = 0; /**< Original UI-side */ + int UIDestination = 0; /**< Destination UI-side */ }; /** diff --git a/Src/LocationView.h b/Src/LocationView.h index 089a08e21c9..575a7fa789f 100644 --- a/Src/LocationView.h +++ b/Src/LocationView.h @@ -16,14 +16,14 @@ class CMergeEditView; */ struct MovedLine { - int apparent0; - int apparent1; - int blockHeight; + int apparent0 = 0; + int apparent1 = 0; + int blockHeight = 0; CPoint ptLeftUpper; CPoint ptLeftLower; CPoint ptRightUpper; CPoint ptRightLower; - bool currentDiff; + bool currentDiff = false; }; typedef CList MOVEDLINE_LIST; diff --git a/Src/OpenView.cpp b/Src/OpenView.cpp index 6ff8ae525fb..752aaa639e2 100644 --- a/Src/OpenView.cpp +++ b/Src/OpenView.cpp @@ -1083,7 +1083,7 @@ void COpenView::SaveComboboxStates() struct UpdateButtonStatesThreadParams { - HWND m_hWnd; + HWND m_hWnd = nullptr; PathContext m_paths; }; diff --git a/Src/SubstitutionFiltersList.h b/Src/SubstitutionFiltersList.h index 7fc86d59342..e6762d3a969 100644 --- a/Src/SubstitutionFiltersList.h +++ b/Src/SubstitutionFiltersList.h @@ -17,10 +17,10 @@ class COptionsMgr; */ struct SubstitutionFilter { - bool enabled; - bool useRegExp; - bool caseSensitive; - bool matchWholeWordOnly; + bool enabled = false; + bool useRegExp = false; + bool caseSensitive = false; + bool matchWholeWordOnly = false; String pattern; String replacement; };