From f44732e721d3b3bd021edaae13b97beb425a8c60 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Sun, 10 Apr 2016 13:51:12 +0000 Subject: mir_core: - warning fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@16623 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/mir_core/src/ui_utils.cpp | 8 ++++---- src/mir_core/src/utils.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/mir_core/src/ui_utils.cpp b/src/mir_core/src/ui_utils.cpp index 3d89cc49a2..00db886616 100644 --- a/src/mir_core/src/ui_utils.cpp +++ b/src/mir_core/src/ui_utils.cpp @@ -227,7 +227,7 @@ INT_PTR CDlgBase::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) INT_PTR CALLBACK CDlgBase::GlobalDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - CDlgBase *wnd = NULL; + CDlgBase *wnd; if (msg == WM_INITDIALOG) { wnd = (CDlgBase*)lParam; wnd->m_hwnd = hwnd; @@ -242,7 +242,7 @@ INT_PTR CALLBACK CDlgBase::GlobalDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPA int CDlgBase::GlobalDlgResizer(HWND hwnd, LPARAM, UTILRESIZECONTROL *urc) { - CDlgBase *wnd = wnd = CDlgBase::Find(hwnd); + CDlgBase *wnd = CDlgBase::Find(hwnd); return (wnd == NULL) ? 0 : wnd->Resizer(urc); } @@ -940,8 +940,8 @@ BOOL CCtrlListView::OnNotify(int, NMHDR *pnmh) // additional api HIMAGELIST CCtrlListView::CreateImageList(int iImageList) { - HIMAGELIST hIml; - if (hIml = GetImageList(iImageList)) + HIMAGELIST hIml = GetImageList(iImageList); + if (hIml) return hIml; hIml = ImageList_Create(16, 16, ILC_COLOR32 | ILC_MASK, 0, 1); diff --git a/src/mir_core/src/utils.cpp b/src/mir_core/src/utils.cpp index 94501d6128..f6bac7c121 100644 --- a/src/mir_core/src/utils.cpp +++ b/src/mir_core/src/utils.cpp @@ -146,9 +146,9 @@ MIR_CORE_DLL(char*) strdel(char *str, size_t len) { char* p; for (p = str + len; *p != 0; p++) - p[-len] = *p; + *(p - len) = *p; - p[-len] = '\0'; + *(p - len) = '\0'; return str; } @@ -156,9 +156,9 @@ MIR_CORE_DLL(wchar_t*) strdelw(wchar_t *str, size_t len) { wchar_t* p; for (p = str + len; *p != 0; p++) - p[-len] = *p; + *(p - len) = *p; - p[-len] = '\0'; + *(p - len) = '\0'; return str; } -- cgit v1.2.3