Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/windirstat.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Schneider <oliver@assarbad.net>2018-10-09 23:19:01 +0300
committerOliver Schneider <oliver@assarbad.net>2018-10-09 23:19:01 +0300
commitc26c2bc4a1e97ea50a2daad620c343e6c5dd81c1 (patch)
treeb0aeee294bcb1aa69bdfdc34fe2e9043c4012e50 /windirstat/Dialogs
parent3008e91efac446fc21d607485cb787c457401a8b (diff)
Fixed a number of warnings from the static analyzer and switched to GetTickCount64 (or a surrogate function on pre-Vista) whereever we use millisecond values
Diffstat (limited to 'windirstat/Dialogs')
-rw-r--r--windirstat/Dialogs/SelectDrivesDlg.cpp8
-rw-r--r--windirstat/Dialogs/aboutdlg.cpp8
2 files changed, 13 insertions, 3 deletions
diff --git a/windirstat/Dialogs/SelectDrivesDlg.cpp b/windirstat/Dialogs/SelectDrivesDlg.cpp
index 034d22e..00c1db7 100644
--- a/windirstat/Dialogs/SelectDrivesDlg.cpp
+++ b/windirstat/Dialogs/SelectDrivesDlg.cpp
@@ -260,11 +260,11 @@ CString CDriveItem::GetText(int subitem) const
case COL_GRAPH:
if(m_querying)
{
- s.LoadString(IDS_QUERYING);
+ VERIFY(s.LoadString(IDS_QUERYING));
}
else if(!m_success)
{
- s.LoadString(IDS_NOTACCESSIBLE);
+ VERIFY(s.LoadString(IDS_NOTACCESSIBLE));
}
break;
@@ -453,6 +453,7 @@ void CDrivesList::OnLButtonDown(UINT /*nFlags*/, CPoint /*point*/)
ZeroMemory(&lv, sizeof(lv));
lv.hdr.hwndFrom = m_hWnd;
lv.hdr.idFrom = GetDlgCtrlID();
+#pragma warning(suppress: 26454)
lv.hdr.code = LVN_ITEMCHANGED;
GetParent()->SendMessage(WM_NOTIFY, GetDlgCtrlID(), (LPARAM)&lv);
@@ -482,8 +483,10 @@ void CDrivesList::OnNMDblclk(NMHDR * /*pNMHDR*/, LRESULT *pResult)
BEGIN_MESSAGE_MAP(CDrivesList, COwnerDrawnListControl)
ON_WM_LBUTTONDOWN()
+#pragma warning(suppress: 26454)
ON_NOTIFY_REFLECT(LVN_DELETEITEM, OnLvnDeleteitem)
ON_WM_MEASUREITEM_REFLECT()
+#pragma warning(suppress: 26454)
ON_NOTIFY_REFLECT(NM_DBLCLK, OnNMDblclk)
END_MESSAGE_MAP()
@@ -533,6 +536,7 @@ BEGIN_MESSAGE_MAP(CSelectDrivesDlg, CDialog)
ON_BN_CLICKED(IDC_SOMEDRIVES, OnBnClickedSomedrives)
ON_EN_CHANGE(IDC_FOLDERNAME, OnEnChangeFoldername)
ON_WM_MEASUREITEM()
+#pragma warning(suppress: 26454)
ON_NOTIFY(LVN_ITEMCHANGED, IDC_DRIVES, OnLvnItemchangedDrives)
ON_BN_CLICKED(IDC_ALLLOCALDRIVES, OnBnClickedAlllocaldrives)
ON_WM_SIZE()
diff --git a/windirstat/Dialogs/aboutdlg.cpp b/windirstat/Dialogs/aboutdlg.cpp
index b4e58c0..db1c90f 100644
--- a/windirstat/Dialogs/aboutdlg.cpp
+++ b/windirstat/Dialogs/aboutdlg.cpp
@@ -67,6 +67,11 @@ namespace
}
hresource = ::LoadResource(dll, hrsrc);
+ if (!hresource)
+ {
+ MdThrowLastWinerror();
+ }
+
const BYTE *pData = (const BYTE *)::LockResource(hresource);
CComBSTR bstr(dwSize, (LPCSTR)pData);
@@ -153,7 +158,7 @@ void CAboutDlg::CMyTabControl::SetPageText(int tab)
break;
case TAB_THANKSTO:
{
- text.LoadString(IDS_ABOUT_THANKSTOTEXT);
+ VERIFY(text.LoadString(IDS_ABOUT_THANKSTOTEXT));
}
break;
case TAB_LICENSE:
@@ -345,6 +350,7 @@ void CAboutDlg::DoDataExchange(CDataExchange* pDX)
}
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
+#pragma warning(suppress: 26454)
ON_NOTIFY(TCN_SELCHANGE, IDC_TAB, OnTcnSelchangeTab)
ON_WM_SIZE()
ON_WM_GETMINMAXINFO()