From b68ca2a7e1035ecceb09fc1efe7529d5d8c989bf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 26 Jul 2019 11:30:13 +0300 Subject: warning fixes --- plugins/UserInfoEx/src/classPsTreeItem.cpp | 2 +- plugins/UserInfoEx/src/ctrl_annivedit.cpp | 6 ++---- plugins/UserInfoEx/src/svc_refreshci.cpp | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) (limited to 'plugins/UserInfoEx/src') diff --git a/plugins/UserInfoEx/src/classPsTreeItem.cpp b/plugins/UserInfoEx/src/classPsTreeItem.cpp index 6e88f8d7cb..aac56ca1bd 100644 --- a/plugins/UserInfoEx/src/classPsTreeItem.cpp +++ b/plugins/UserInfoEx/src/classPsTreeItem.cpp @@ -426,7 +426,7 @@ int CPsTreeItem::Create(CPsHdr* pPsh, OPTIONSDIALOGPAGE *odp) // load custom order if (!(pPsh->_dwFlags & PSTVF_SORTTREE)) { _iPosition = (int)g_plugin.getByte(PropertyKey(SET_ITEM_POS), odp->position); - if ((_iPosition < 0) && (_iPosition > 0x800000A)) + if ((_iPosition < 0) || (_iPosition > 0x800000A)) _iPosition = 0; } // read visibility state diff --git a/plugins/UserInfoEx/src/ctrl_annivedit.cpp b/plugins/UserInfoEx/src/ctrl_annivedit.cpp index 612a6fe0a1..a7fdec5079 100644 --- a/plugins/UserInfoEx/src/ctrl_annivedit.cpp +++ b/plugins/UserInfoEx/src/ctrl_annivedit.cpp @@ -187,10 +187,8 @@ MAnnivDate* CAnnivEditCtrl::FindDateById(const WORD wId) **/ INT_PTR CAnnivEditCtrl::AddDate(MAnnivDate &mda) { - MAnnivDate *pmda, **pmd; - // if a date with wID exists, replace it - if ((pmda = FindDateById(mda.Id())) != nullptr) { + if (MAnnivDate *pmda = FindDateById(mda.Id())) { BYTE bChanged = pmda->IsChanged(), bRemindChanged = pmda->IsReminderChanged(); @@ -209,7 +207,7 @@ INT_PTR CAnnivEditCtrl::AddDate(MAnnivDate &mda) if (mda.Id() == ANID_NONE) mda.Id(_numDates - 1); - if (pmd = (MAnnivDate **)mir_realloc(_pDates, (_numDates + 1) * sizeof(pmda))) { + if (MAnnivDate **pmd = (MAnnivDate **)mir_realloc(_pDates, (_numDates + 1) * sizeof(MAnnivDate *))) { _pDates = pmd; if (_pDates[_numDates] = new MAnnivDate(mda)) { _numDates++; diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp index 9b28bfe730..b5d3ebaab9 100644 --- a/plugins/UserInfoEx/src/svc_refreshci.cpp +++ b/plugins/UserInfoEx/src/svc_refreshci.cpp @@ -199,7 +199,7 @@ public: _bBBCode = FALSE; } - ~CUpdProgress() + virtual ~CUpdProgress() { } -- cgit v1.2.3