Skip to content

Commit

Permalink
warning C26495: Variable '...' is uninitialized. Always initialize a …
Browse files Browse the repository at this point in the history
…member variable (type.6).
  • Loading branch information
sdottaka committed Nov 24, 2024
1 parent 846004d commit 5a0ee74
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 30 deletions.
8 changes: 4 additions & 4 deletions Externals/crystaledit/editlib/ccrystaltextmarkers.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions Src/7zCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion Src/7zCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions Src/Common/ExConverter.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

struct CodePageInfo
{
int codepage;
int codepage = 0;
String desc;
String proportionalFont;
String fixedWidthFont;
char bGDICharset;
char bGDICharset = 0;
};

struct IExconverter
Expand Down
2 changes: 1 addition & 1 deletion Src/Common/MessageBoxDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ CString CMessageBoxDialog::GenerateRegistryKey(UINT nMessageID, UINT nHelpID)
struct ModelessMesssageBoxParam
{
CString strMessage;
UINT nType;
UINT nType = 0;
};

/*
Expand Down
8 changes: 4 additions & 4 deletions Src/Concurrent.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ namespace Concurrent
struct TaskParams
{
std::function<ResultType()> 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)
Expand Down
4 changes: 2 additions & 2 deletions Src/DirAdditionalPropertiesDlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ struct Node
String name;
String canonicalName;
String displayName;
bool selected;
HTREEITEM hItem;
bool selected = false;
HTREEITEM hItem = nullptr;
std::list<Node> childNodes;
};

Expand Down
2 changes: 1 addition & 1 deletion Src/DirSelectFilesDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int>(m_pimpl->DoModal()); }

1 change: 1 addition & 0 deletions Src/DirView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 7 additions & 6 deletions Src/FileActionScript.h
Original file line number Diff line number Diff line change
Expand Up @@ -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). */
Expand All @@ -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 */
};

/**
Expand Down Expand Up @@ -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 */
};

/**
Expand Down
8 changes: 4 additions & 4 deletions Src/LocationView.h
Original file line number Diff line number Diff line change
Expand Up @@ -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, MovedLine&> MOVEDLINE_LIST;
Expand Down
2 changes: 1 addition & 1 deletion Src/OpenView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,7 @@ void COpenView::SaveComboboxStates()

struct UpdateButtonStatesThreadParams
{
HWND m_hWnd;
HWND m_hWnd = nullptr;
PathContext m_paths;
};

Expand Down
8 changes: 4 additions & 4 deletions Src/SubstitutionFiltersList.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down

0 comments on commit 5a0ee74

Please sign in to comment.