From d60c72ac3b459dfb419bd53a6c485916b6ea7510 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 25 Jul 2015 13:58:29 +0000 Subject: warnings fixed git-svn-id: http://svn.miranda-ng.org/main/trunk@14686 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Import/src/import.cpp | 38 +++++++++----------------------------- plugins/Import/src/main.cpp | 10 +++++----- plugins/Import/src/miranda.cpp | 13 +++++-------- plugins/Import/src/stdafx.h | 2 +- plugins/Import/src/wizard.cpp | 4 ++-- 5 files changed, 22 insertions(+), 45 deletions(-) (limited to 'plugins') diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index 5127e56e0d..a382dcf0af 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -151,27 +151,6 @@ static MCONTACT HContactFromID(char *pszProtoName, char *pszSetting, TCHAR *pwsz return INVALID_CONTACT_ID; } -static MCONTACT HistoryImportFindContact(HWND hdlgProgress, char *szModuleName, DWORD uin, int addUnknown) -{ - MCONTACT hContact = HContactFromNumericID(szModuleName, "UIN", uin); - if (hContact == NULL) { - AddMessage(LPGENT("Ignored event from/to self")); - return INVALID_CONTACT_ID; - } - - if (hContact != INVALID_CONTACT_ID) - return hContact; - - if (!addUnknown) - return INVALID_CONTACT_ID; - - hContact = CallService(MS_DB_CONTACT_ADD, 0, 0); - Proto_AddToContact(hContact, szModuleName); - db_set_dw(hContact, szModuleName, "UIN", uin); - AddMessage(LPGENT("Added contact %u (found in history)"), uin); - return hContact; -} - ///////////////////////////////////////////////////////////////////////////////////////// static int CopySettingsEnum(const char *szSetting, LPARAM lParam) @@ -264,7 +243,7 @@ static LRESULT CALLBACK ListWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM SendMessage(hwndCombo, WM_KILLFOCUS, 0, (LPARAM)hwndCombo); hwndCombo = CreateWindowEx(WS_EX_CLIENTEDGE, WC_COMBOBOX, _T(""), WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST, - r.left+3, r.top, r.right - r.left - 3, r.bottom - r.top, hwnd, 0, hInst, NULL); + r.left + 3, r.top, r.right - r.left - 3, r.bottom - r.top, hwnd, 0, hInst, NULL); // copy a font from listview HFONT hFont = (HFONT)SendMessage(hwnd, WM_GETFONT, 0, 0); @@ -545,7 +524,7 @@ static MCONTACT MapContact(MCONTACT hSrc) return (pDestContact == NULL) ? INVALID_CONTACT_ID : pDestContact->dstID; } -static MCONTACT AddContact(HWND hdlgProgress, char* szProto, char* pszUniqueSetting, DBVARIANT* id, const TCHAR* pszUserID, TCHAR *nick, TCHAR *group) +static MCONTACT AddContact(char *szProto, char *pszUniqueSetting, DBVARIANT *id, const TCHAR *pszUserID, TCHAR *nick, TCHAR *group) { MCONTACT hContact = CallService(MS_DB_CONTACT_ADD, 0, 0); if (Proto_AddToContact(hContact, szProto) != 0) { @@ -631,7 +610,7 @@ static int ImportGroup(const char* szSettingName, LPARAM lParam) { int *pnGroups = (int*)lParam; - TCHAR* tszGroup = myGetWs(NULL, "CListGroups", szSettingName); + TCHAR *tszGroup = myGetWs(NULL, "CListGroups", szSettingName); if (tszGroup != NULL) { if (CreateGroup(tszGroup + 1, NULL)) pnGroups[0]++; @@ -848,7 +827,7 @@ static MCONTACT ImportContact(MCONTACT hSrc) if (tszNick == NULL) tszNick = myGetWs(hSrc, cc->szProto, "Nick"); - hDst = AddContact(hdlgProgress, pda->pa->szModuleName, pszUniqueSetting, &dbv, pszUniqueID, tszNick, tszGroup); + hDst = AddContact(pda->pa->szModuleName, pszUniqueSetting, &dbv, pszUniqueID, tszNick, tszGroup); if (hDst == INVALID_CONTACT_ID) { AddMessage(LPGENT("Unknown error while adding %S contact %s"), pda->pa->szModuleName, pszUniqueID); return INVALID_CONTACT_ID; @@ -896,7 +875,7 @@ static void ImportHistory(MCONTACT hContact, PROTOACCOUNT **protocol, int protoC else { if (cc->IsSub()) return; - + bIsMeta = cc->IsMeta(); } @@ -928,8 +907,8 @@ static void ImportHistory(MCONTACT hContact, PROTOACCOUNT **protocol, int protoC // check protocols during system history import if (hDst == NULL) { bSkipAll = true; - for (int i = 0; i < protoCount; i++) { - if (!mir_strcmp(dbei.szModule, protocol[i]->szModuleName)) { + for (int k = 0; k < protoCount; k++) { + if (!mir_strcmp(dbei.szModule, protocol[k]->szModuleName)) { bSkipAll = false; break; } @@ -1013,7 +992,8 @@ static void ImportHistory(MCONTACT hContact, PROTOACCOUNT **protocol, int protoC ///////////////////////////////////////////////////////////////////////////////////////// static int CompareModules(const char *p1, const char *p2) -{ return mir_strcmpi(p1, p2); +{ + return mir_strcmpi(p1, p2); } void MirandaImport(HWND hdlg) diff --git a/plugins/Import/src/main.cpp b/plugins/Import/src/main.cpp index 4882015f5d..63b33f4709 100644 --- a/plugins/Import/src/main.cpp +++ b/plugins/Import/src/main.cpp @@ -47,13 +47,13 @@ PLUGININFOEX pluginInfo = {0x2d77a746, 0xa6, 0x4343, {0xbf, 0xc5, 0xf8, 0x8, 0xcd, 0xd7, 0x72, 0xea}} }; -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID) { hInst = hinstDLL; return TRUE; } -static INT_PTR ImportCommand(WPARAM wParam,LPARAM lParam) +static INT_PTR ImportCommand(WPARAM, LPARAM) { if (IsWindow(hwndWizard)) { SetForegroundWindow(hwndWizard); @@ -67,7 +67,7 @@ static INT_PTR ImportCommand(WPARAM wParam,LPARAM lParam) ///////////////////////////////////////////////////////////////////////////////////////// // MirandaPluginInfoEx - returns an information about a plugin -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { return &pluginInfo; } @@ -80,7 +80,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_IMPORT, ///////////////////////////////////////////////////////////////////////////////////////// // Performs a primary set of actions upon plugin loading -static int ModulesLoaded(WPARAM wParam, LPARAM lParam) +static int ModulesLoaded(WPARAM, LPARAM) { if (db_get_b(NULL, IMPORT_MODULE, IMP_KEY_FR, 0)) return 0; @@ -96,7 +96,7 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) return 0; } -static int OnExit(WPARAM wParam, LPARAM lParam) +static int OnExit(WPARAM, LPARAM) { if (hwndWizard) SendMessage(hwndWizard, WM_CLOSE, 0, 0); diff --git a/plugins/Import/src/miranda.cpp b/plugins/Import/src/miranda.cpp index 4fff7dcce1..d4cad24695 100644 --- a/plugins/Import/src/miranda.cpp +++ b/plugins/Import/src/miranda.cpp @@ -63,8 +63,10 @@ static void SearchForLists(HWND hwndDlg, const TCHAR *mirandaPath, const TCHAR * FindClose(hFind); } -INT_PTR CALLBACK MirandaPageProc(HWND hwndDlg,UINT message,WPARAM wParam,LPARAM lParam) +INT_PTR CALLBACK MirandaPageProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM) { + TCHAR filename[MAX_PATH]; + switch(message) { case WM_INITDIALOG: TranslateDialogDefault(hwndDlg); @@ -81,7 +83,6 @@ INT_PTR CALLBACK MirandaPageProc(HWND hwndDlg,UINT message,WPARAM wParam,LPARAM } SendDlgItemMessage(hwndDlg, IDC_LIST, LB_SETCURSEL, 0, 0); SendMessage(hwndDlg, WM_COMMAND, MAKELONG(IDC_LIST, LBN_SELCHANGE), 0); - TCHAR filename[MAX_PATH]; GetDlgItemText(hwndDlg, IDC_FILENAME, filename, _countof(filename)); if (_taccess(filename, 4)) SendMessage(GetParent(hwndDlg), WIZM_DISABLEBUTTON, 1, 0); @@ -94,7 +95,6 @@ INT_PTR CALLBACK MirandaPageProc(HWND hwndDlg,UINT message,WPARAM wParam,LPARAM break; case IDOK: - TCHAR filename[MAX_PATH]; GetDlgItemText(hwndDlg, IDC_FILENAME, filename, _countof(filename)); if (_taccess(filename, 4)) { MessageBox(hwndDlg, TranslateT("The given file does not exist. Please check that you have entered the name correctly."), TranslateT("Miranda Import"), MB_OK); @@ -154,7 +154,7 @@ INT_PTR CALLBACK MirandaPageProc(HWND hwndDlg,UINT message,WPARAM wParam,LPARAM //======================================================================================= // Import options dialog -INT_PTR CALLBACK MirandaOptionsPageProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK MirandaOptionsPageProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM) { switch (message) { case WM_INITDIALOG: @@ -216,7 +216,7 @@ static const UINT InControls[] = { IDC_IN_MSG, IDC_IN_URL, IDC_IN_FT, IDC_IN_OTH static const UINT OutControls[] = { IDC_OUT_MSG, IDC_OUT_URL, IDC_OUT_FT, IDC_OUT_OTHER }; static const UINT SysControls[] = { IDC_CONTACTS, IDC_SYSTEM }; -INT_PTR CALLBACK MirandaAdvOptionsPageProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK MirandaAdvOptionsPageProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM) { switch (message) { case WM_INITDIALOG: @@ -299,9 +299,6 @@ INT_PTR CALLBACK MirandaAdvOptionsPageProc(HWND hwndDlg, UINT message, WPARAM wP EnableWindow(GetDlgItem(hwndDlg, IDC_DATETIMEPICKER), IsDlgButtonChecked(hwndDlg, IDC_SINCE)); break; - if (HIWORD(wParam) != STN_CLICKED) - break; - case IDC_ALL: case IDC_INCOMING: case IDC_OUTGOING: diff --git a/plugins/Import/src/stdafx.h b/plugins/Import/src/stdafx.h index 94b311fbaa..4b6657fc30 100644 --- a/plugins/Import/src/stdafx.h +++ b/plugins/Import/src/stdafx.h @@ -99,7 +99,7 @@ bool IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO dbei); int CreateGroup(const TCHAR* name, MCONTACT hContact); extern HINSTANCE hInst; -extern HWND hdlgProgress, hwndAccMerge; +extern HWND hwndAccMerge; extern int nImportOptions; extern TCHAR importFile[]; extern time_t dwSinceDate; diff --git a/plugins/Import/src/wizard.cpp b/plugins/Import/src/wizard.cpp index 05328ce8d6..f995663580 100644 --- a/plugins/Import/src/wizard.cpp +++ b/plugins/Import/src/wizard.cpp @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h" -INT_PTR CALLBACK WizardIntroPageProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK WizardIntroPageProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM) { switch (message) { case WM_INITDIALOG: @@ -45,7 +45,7 @@ INT_PTR CALLBACK WizardIntroPageProc(HWND hdlg, UINT message, WPARAM wParam, LPA return FALSE; } -INT_PTR CALLBACK FinishedPageProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK FinishedPageProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM) { switch (message) { case WM_INITDIALOG: -- cgit v1.2.3