OSDN Git Service

Cppcheck: Member variable '*::*' is not initialized in the constructor.
authorsdottaka <sdottaka@sourceforge.net>
Mon, 5 May 2014 13:28:20 +0000 (22:28 +0900)
committersdottaka <sdottaka@sourceforge.net>
Mon, 5 May 2014 13:28:20 +0000 (22:28 +0900)
--HG--
branch : stable

12 files changed:
Src/Common/multiformatText.h
Src/DirCmpReportDlg.cpp
Src/DirFilterDlg.cpp
Src/GhostTextView.cpp
Src/HexMergeView.cpp
Src/PropColors.cpp
Src/PropSyntaxColors.cpp
Src/PropTextColors.cpp
Src/PropTextColors.h
Src/UniMarkdownFile.cpp
Src/WaitStatusCursor.cpp
Src/WaitStatusCursor.h

index 25e44f0..d048551 100644 (file)
 class storageForPlugins
 {
 public:
-       storageForPlugins() : m_bstr(NULL)
+       storageForPlugins()
+       : m_bstr(NULL)
+       , m_bOriginalIsUnicode(false)
+       , m_bCurrentIsUnicode(false)
+       , m_bCurrentIsFile(false)
+       , m_bOverwriteSourceFile(false)
+       , m_nChangedValid(0)
+       , m_bError(false)
+       , m_codepage(0)
+       , m_nBomSize(0)
+       , m_nChanged(0)
        {
                VariantInit(&m_array);
        }
@@ -140,4 +150,4 @@ private:
 /// Convert file to UTF-8 (for diffutils)
 bool AnyCodepageToUTF8(int codepage, const String& filepath, const String& filepathDst, int & nFileChanged, bool bWriteBOM);
 
-#endif //__MULTIFORMATTEXT_H__
\ No newline at end of file
+#endif //__MULTIFORMATTEXT_H__
index 8a03828..947701d 100644 (file)
@@ -25,6 +25,7 @@ DirCmpReportDlg::DirCmpReportDlg(CWnd* pParent /*=NULL*/)
        : CDialog(DirCmpReportDlg::IDD, pParent)
        , m_bCopyToClipboard(FALSE)
        , m_bIncludeFileCmpReport(FALSE)
+       , m_nReportType(REPORT_TYPE_COMMALIST)
 {
 }
 
index 3fc12b5..6b3ab1a 100644 (file)
@@ -24,6 +24,7 @@ IMPLEMENT_DYNAMIC(DirFilterDlg, CDialog)
 DirFilterDlg::DirFilterDlg(CWnd* pParent /*=NULL*/)
        : CDialog(DirFilterDlg::IDD, pParent)
        , m_bCopyToClipboard(FALSE)
+       , m_nReportType(REPORT_TYPE_COMMALIST)
 {
 }
 
index 30331e4..671c1ab 100644 (file)
@@ -43,6 +43,7 @@ IMPLEMENT_DYNCREATE (CGhostTextView, CCrystalEditViewEx)
  */
 CGhostTextView::CGhostTextView()
 : m_pGhostTextBuffer(NULL)
+, m_nTopSubLinePushed(0)
 {
 }
 
index cb0c118..1ee8742 100644 (file)
@@ -106,6 +106,7 @@ CHexMergeView::CHexMergeView()
 : m_pif(0)
 , m_nThisPane(0)
 , m_mtime(0)
+, m_size(0)
 {
 }
 
index a97faec..af2619b 100644 (file)
@@ -26,6 +26,7 @@ static char THIS_FILE[] = __FILE__;
 PropMergeColors::PropMergeColors(COptionsMgr *optionsMgr)
  : OptionsPanel(optionsMgr, PropMergeColors::IDD)
 {
+       memset(m_cCustColors, 0, sizeof(m_cCustColors));
 }
 
 void PropMergeColors::DoDataExchange(CDataExchange* pDX)
index a10cd98..44d0d7f 100644 (file)
@@ -56,6 +56,8 @@ PropSyntaxColors::PropSyntaxColors(COptionsMgr *optionsMgr, SyntaxColors *pColor
        m_nPreProcessorBold = GetCheckVal(COLORINDEX_PREPROCESSOR);
        m_nUser1Bold = GetCheckVal(COLORINDEX_USER1);
        m_nUser2Bold = GetCheckVal(COLORINDEX_USER2);
+
+       memset(m_cCustColors, 0, sizeof(m_cCustColors));
 }
 
 void PropSyntaxColors::DoDataExchange(CDataExchange* pDX)
index 8184e13..2e5c9c5 100644 (file)
@@ -32,6 +32,7 @@ PropTextColors::PropTextColors(COptionsMgr *optionsMgr, SyntaxColors *pColors)
 , m_bCustomColors(FALSE)
 , m_pTempColors(pColors)
 {
+       memset(m_cCustColors, 0, sizeof(m_cCustColors));
 }
 
 void PropTextColors::DoDataExchange(CDataExchange* pDX)
index 3fa9234..49d630d 100644 (file)
@@ -46,12 +46,6 @@ private:
        BOOL            m_bCustomColors;
        //}}AFX_DATA
 
-       COLORREF        m_clrWhitespaceBackground;
-       COLORREF        m_clrRegularBackground;
-       COLORREF        m_clrRegularText;
-       COLORREF        m_clrSelectionBackground;
-       COLORREF        m_clrSelectionText;
-
        // Overrides
        // ClassWizard generated virtual function overrides
        //{{AFX_VIRTUAL(PropTextColors)
index 96991ba..639b62c 100644 (file)
@@ -17,6 +17,9 @@ static void CollapseWhitespace(String &line);
  */
 UniMarkdownFile::UniMarkdownFile()
 : m_pMarkdown(NULL)
+, m_depth(0)
+, m_bMove(false)
+, m_transparent(NULL)
 {
 }
 
index 5d917df..20e3840 100644 (file)
@@ -44,15 +44,17 @@ void CustomStatusCursor::SetStatusDisplay(IStatusDisplay * piStatusDisplay)
 CStringArray CustomStatusCursor::msgStack;
 CPtrArray CustomStatusCursor::cursorStack;
 CDWordArray CustomStatusCursor::validStack;
-int CustomStatusCursor::stackSize = 0;
+INT_PTR CustomStatusCursor::stackSize = 0;
 
 CustomStatusCursor::CustomStatusCursor()
 : m_ended(false)
+, posInStack(0)
 {
 }
 
 CustomStatusCursor::CustomStatusCursor(HINSTANCE hinst, LPCTSTR lpCursorName, LPCTSTR fmt, ...)
 : m_ended(false)
+, posInStack(0)
 {
        va_list argp;
        va_start(argp, fmt);
@@ -140,7 +142,7 @@ void CustomStatusCursor::End()
        if (posInStack == cursorStack.GetUpperBound())
        {
                // find the last valid cursor
-               int posValid = posInStack-1;
+               INT_PTR posValid = posInStack-1;
                while (validStack.GetAt(posValid) == 0)
                        posValid --;
                ASSERT (posValid >= 0);
index f155bd5..6232c91 100644 (file)
@@ -52,7 +52,7 @@ private:
         * @note valid values : 0 (no wait cursor), 
         * >= 2 (stack[0] is the default cursor, and stack[1..n] are wait cursors)
         */
-       static int stackSize;
+       static INT_PTR stackSize;
        /**
         * @brief Stack of messages, the currently displayed is the one on top of stack
         *