diff options
author | George Hazan <ghazan@miranda.im> | 2019-07-26 20:02:16 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-07-26 20:02:22 +0300 |
commit | 9374c8e701dcb61a46c89a854235d91a23bf672e (patch) | |
tree | ad366bc7f47da578fb33a57c32912689f5aadecb /src | |
parent | 3c5923d11431c515db57e4e972d53bf0443f1bcb (diff) |
warning fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stdmsg/src/msgs.cpp | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/stdafx.h | 2 | ||||
-rw-r--r-- | src/mir_app/src/clcutils.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/colorchooser.cpp | 11 | ||||
-rw-r--r-- | src/mir_app/src/proto_utils.cpp | 2 | ||||
-rw-r--r-- | src/mir_core/src/CCtrlTreeView.cpp | 3 | ||||
-rw-r--r-- | src/mir_core/src/CDbLink.cpp | 3 |
7 files changed, 11 insertions, 14 deletions
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index 50c98f7a98..3647e86176 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -168,7 +168,7 @@ INT_PTR SendMessageCmd(MCONTACT hContact, wchar_t *pwszInitialText) {
/* does the MCONTACT's protocol support IM messages? */
char *szProto = GetContactProto(hContact);
- if (!szProto || (!CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND))
+ if (!szProto || !(CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND))
return 1;
hContact = db_mc_tryMeta(hContact);
diff --git a/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h index b24778cf89..2d1a4e18e6 100644 --- a/src/core/stdmsg/src/stdafx.h +++ b/src/core/stdmsg/src/stdafx.h @@ -153,7 +153,7 @@ class CTabbedWindow : public CDlgBase public:
CCtrlPages m_tab;
- HWND m_hwndStatus;
+ HWND m_hwndStatus = nullptr;
CMsgDialog *m_pEmbed = nullptr;
CTabbedWindow();
diff --git a/src/mir_app/src/clcutils.cpp b/src/mir_app/src/clcutils.cpp index 2ba762e39a..cd26b13f54 100644 --- a/src/mir_app/src/clcutils.cpp +++ b/src/mir_app/src/clcutils.cpp @@ -422,7 +422,7 @@ MIR_APP_DLL(void) Clist_EndRename(ClcData *dat, int save) ClcContact *contact;
if (g_clistApi.pfnGetRowByIndex(dat, dat->selection, &contact, nullptr) != -1) {
- if (mir_wstrcmp(contact->szText, text) && !wcsstr(text, L"\\")) {
+ if (mir_wstrcmp(contact->szText, text) && !wcschr(text, '\\')) {
if (contact->type == CLCIT_GROUP) {
if (contact->group->parent && contact->group->parent->parent) {
wchar_t szFullName[256];
diff --git a/src/mir_app/src/colorchooser.cpp b/src/mir_app/src/colorchooser.cpp index 6ed91bddda..0909e2cbad 100644 --- a/src/mir_app/src/colorchooser.cpp +++ b/src/mir_app/src/colorchooser.cpp @@ -49,7 +49,7 @@ class CColorChooserDlg : public CDlgBase int m_xPosition, m_yPosition;
int iCurrentHotTrack, iRows, iColumns;
- HWND m_hwndTarget, m_hwndChooser, hwndPreviousActiveWindow;
+ HWND m_hwndTarget, m_hwndChooser;
BOOL m_bForeground, bChoosing;
int CalculateCoordinatesToButton(POINT pt)
@@ -103,15 +103,14 @@ public: m_hwndParent = hwndDlg;
m_xPosition = rc.left + 3;
m_yPosition = IsWindowVisible(hwndChooser) ? rc.top - 1 : rc.top + 20;
- }
- bool OnInitDialog() override
- {
int iSquareRoot = (int)sqrt(static_cast<float>(16));
-
iColumns = iSquareRoot * iSquareRoot == 16 ? iSquareRoot : iSquareRoot + 1;
iRows = iSquareRoot;
+ }
+ bool OnInitDialog() override
+ {
RECT rc;
rc.top = rc.left = 100;
rc.right = 100 + iColumns * 25 + 1;
@@ -180,8 +179,6 @@ public: case WM_ACTIVATE:
if (wParam == WA_INACTIVE)
Close();
- else if ((wParam == WA_ACTIVE) || (wParam == WA_CLICKACTIVE))
- hwndPreviousActiveWindow = (HWND)lParam;
break;
case WM_MOUSEMOVE:
diff --git a/src/mir_app/src/proto_utils.cpp b/src/mir_app/src/proto_utils.cpp index 06b775cf7a..16071e63b4 100644 --- a/src/mir_app/src/proto_utils.cpp +++ b/src/mir_app/src/proto_utils.cpp @@ -164,8 +164,6 @@ PROTO_INTERFACE::PROTO_INTERFACE(const char *pszModuleName, const wchar_t *ptszU m_hmiReqAuth = hReqAuth;
m_hmiGrantAuth = hGrantAuth;
m_hmiRevokeAuth = hRevokeAuth;
-
- m_hWindowList = nullptr;
}
PROTO_INTERFACE::~PROTO_INTERFACE()
diff --git a/src/mir_core/src/CCtrlTreeView.cpp b/src/mir_core/src/CCtrlTreeView.cpp index eeb0eba76e..8463f4d16e 100644 --- a/src/mir_core/src/CCtrlTreeView.cpp +++ b/src/mir_core/src/CCtrlTreeView.cpp @@ -35,7 +35,8 @@ int ImageList_AddIcon_IconLibLoaded(HIMAGELIST hIml, int iconId) CCtrlTreeView::CCtrlTreeView(CDlgBase *dlg, int ctrlId) : CCtrlBase(dlg, ctrlId), - m_dwFlags(0) + m_dwFlags(0), + m_hDragItem(nullptr) {} void CCtrlTreeView::SetFlags(uint32_t dwFlags) diff --git a/src/mir_core/src/CDbLink.cpp b/src/mir_core/src/CDbLink.cpp index 48bbfb9a6c..13451f18ff 100644 --- a/src/mir_core/src/CDbLink.cpp +++ b/src/mir_core/src/CDbLink.cpp @@ -36,7 +36,8 @@ CDbLink::CDbLink(const char *szModule, const char *szSetting, BYTE type, DWORD i }
CDbLink::CDbLink(const char *szModule, const char *szSetting, BYTE type, wchar_t *szValue)
- : CDataLink(type)
+ : CDataLink(type),
+ m_iDefault(0)
{
m_szModule = mir_strdup(szModule);
m_szSetting = mir_strdup(szSetting);
|