From 2548065ebc5da2a8778cd4f49343b847773ee174 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 11 Aug 2015 15:39:23 +0000 Subject: 'unreferenced formal parameter' warnings fixed git-svn-id: http://svn.miranda-ng.org/main/trunk@14913 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SeenPlugin/src/file.cpp | 4 ++-- plugins/SeenPlugin/src/history.cpp | 10 +++++----- plugins/SeenPlugin/src/main.cpp | 2 +- plugins/SeenPlugin/src/menu.cpp | 15 ++++++--------- plugins/SeenPlugin/src/options.cpp | 4 ++-- plugins/SeenPlugin/src/stdafx.h | 2 +- plugins/SeenPlugin/src/userinfo.cpp | 2 +- plugins/SeenPlugin/src/utils.cpp | 12 ++++++------ 8 files changed, 24 insertions(+), 27 deletions(-) (limited to 'plugins/SeenPlugin') diff --git a/plugins/SeenPlugin/src/file.cpp b/plugins/SeenPlugin/src/file.cpp index fccd0ca9e6..adbea85e83 100644 --- a/plugins/SeenPlugin/src/file.cpp +++ b/plugins/SeenPlugin/src/file.cpp @@ -55,9 +55,9 @@ void UninitFileOutput() void FileWrite(MCONTACT hcontact) { - FILE *log = _tfopen(ParseString(g_ptszFileName, hcontact, 1), _T("a")); + FILE *log = _tfopen(ParseString(g_ptszFileName, hcontact), _T("a")); if (log != NULL) { - _fputts(ParseString(g_ptszFileStamp, hcontact, 1), log); + _fputts(ParseString(g_ptszFileStamp, hcontact), log); fputs("\r\n", log); fclose(log); } diff --git a/plugins/SeenPlugin/src/history.cpp b/plugins/SeenPlugin/src/history.cpp index 2c5c60c8d2..2aaea47284 100644 --- a/plugins/SeenPlugin/src/history.cpp +++ b/plugins/SeenPlugin/src/history.cpp @@ -53,10 +53,10 @@ void HistoryWrite(MCONTACT hContact) TCHAR *ptszString; DBVARIANT dbv; if (!db_get_ts(NULL, S_MOD, "HistoryStamp", &dbv)) { - ptszString = ParseString(dbv.ptszVal, hContact, 0); + ptszString = ParseString(dbv.ptszVal, hContact); db_free(&dbv); } - else ptszString = ParseString(DEFAULT_HISTORYSTAMP, hContact, 0); + else ptszString = ParseString(DEFAULT_HISTORYSTAMP, hContact); db_set_ts(hContact, S_MOD, BuildSetting(historyLast), ptszString); historyLast = (historyLast + 1) % historyMax; @@ -152,7 +152,7 @@ HDWP MyHorizCenterWindow(HDWP hDwp, HWND hwndDlg, HWND hwndControl, } -void MyResizeGetOffset(HWND hwndDlg, HWND hwndControl, int nWidth, int nHeight, int* nDx, int* nDy) +void MyResizeGetOffset(HWND hwndControl, int nWidth, int nHeight, int* nDx, int* nDy) { RECT rcinit; @@ -235,7 +235,7 @@ INT_PTR CALLBACK HistoryDlgProc(HWND hwndDlg, UINT Message, WPARAM wparam, LPARA CallService(MS_MSG_SENDMESSAGE, hContact, 0); break; case IDC_TEST: - debug(ParseString(LPGENT("Date: %d.%m.%y(%Y) \n Date desc: %W - %w - %E - %e \n Time: %H:%M:%S (%h-%p) \n user: %n - %u \n Status: %s \n IP: %i - %r"), hContact, 0)); + debug(ParseString(LPGENT("Date: %d.%m.%y(%Y) \n Date desc: %W - %w - %E - %e \n Time: %H:%M:%S (%h-%p) \n user: %n - %u \n Status: %s \n IP: %i - %r"), hContact)); break; } break; @@ -244,7 +244,7 @@ INT_PTR CALLBACK HistoryDlgProc(HWND hwndDlg, UINT Message, WPARAM wparam, LPARA int dx, dy; { HDWP hDwp = BeginDeferWindowPos(6); - MyResizeGetOffset(hwndDlg, GetDlgItem(hwndDlg, IDC_HISTORYLIST), LOWORD(lparam) - 15, HIWORD(lparam) - 99, &dx, &dy); + MyResizeGetOffset(GetDlgItem(hwndDlg, IDC_HISTORYLIST), LOWORD(lparam) - 15, HIWORD(lparam) - 99, &dx, &dy); hDwp = MyResizeWindow(hDwp, hwndDlg, GetDlgItem(hwndDlg, IDC_USERMENU), dx, 0, 0, 0); hDwp = MyResizeWindow(hDwp, hwndDlg, GetDlgItem(hwndDlg, IDC_DETAILS), dx, 0, 0, 0); hDwp = MyResizeWindow(hDwp, hwndDlg, GetDlgItem(hwndDlg, IDC_SENDMSG), dx, 0, 0, 0); diff --git a/plugins/SeenPlugin/src/main.cpp b/plugins/SeenPlugin/src/main.cpp index 84af665552..7403d10827 100644 --- a/plugins/SeenPlugin/src/main.cpp +++ b/plugins/SeenPlugin/src/main.cpp @@ -131,7 +131,7 @@ extern "C" __declspec(dllexport) int Unload(void) return 0; } -BOOL WINAPI DllMain(HINSTANCE hinst, DWORD fdwReason, LPVOID lpvReserved) +BOOL WINAPI DllMain(HINSTANCE hinst, DWORD, LPVOID) { hInstance = hinst; return 1; diff --git a/plugins/SeenPlugin/src/menu.cpp b/plugins/SeenPlugin/src/menu.cpp index 9bd1c79b98..5d11fa4c54 100644 --- a/plugins/SeenPlugin/src/menu.cpp +++ b/plugins/SeenPlugin/src/menu.cpp @@ -28,18 +28,15 @@ void InitHistoryDialog(void); ///////////////////////////////////////////////////////////////////////////////////////// // Handles the messages sent by clicking the contact's menu item -INT_PTR MenuitemClicked(WPARAM wparam, LPARAM) +INT_PTR MenuitemClicked(WPARAM hContact, LPARAM) { - ShowHistory((MCONTACT)wparam, 0); + ShowHistory(hContact, 0); return 0; } -int BuildContactMenu(WPARAM wparam, LPARAM) +int BuildContactMenu(WPARAM hContact, LPARAM) { - int id = -1, isetting; - MCONTACT hContact = (MCONTACT)wparam; char *szProto = GetContactProto(hContact); - if (!IsWatchedProtocol(szProto) || db_get_b(hContact, szProto, "ChatRoom", false) || !db_get_b(NULL, S_MOD, "MenuItem", 1)) { Menu_ShowItem(hmenuitem, false); return 0; @@ -48,9 +45,9 @@ int BuildContactMenu(WPARAM wparam, LPARAM) LPCTSTR ptszName; ptrT tszStamp(db_get_tsa(NULL, S_MOD, "MenuStamp")); if (tszStamp != NULL) - ptszName = ParseString(tszStamp , (MCONTACT)wparam, 0); + ptszName = ParseString(tszStamp , hContact); else - ptszName = ParseString(DEFAULT_MENUSTAMP, (MCONTACT)wparam, 0); + ptszName = ParseString(DEFAULT_MENUSTAMP, hContact); int flags = 0; HICON hIcon = NULL; @@ -61,7 +58,7 @@ int BuildContactMenu(WPARAM wparam, LPARAM) flags |= CMIF_HIDDEN; } else if (db_get_b(NULL, S_MOD, "ShowIcon", 1)) { - isetting = db_get_w(hContact, S_MOD, "StatusTriger", -1); + int isetting = db_get_w(hContact, S_MOD, "StatusTriger", -1); hIcon = Skin_LoadProtoIcon(szProto, isetting | 0x8000); } Menu_ModifyItem(hmenuitem, ptszName, hIcon, flags); diff --git a/plugins/SeenPlugin/src/options.cpp b/plugins/SeenPlugin/src/options.cpp index 4d1db993c4..e704a9f8c2 100644 --- a/plugins/SeenPlugin/src/options.cpp +++ b/plugins/SeenPlugin/src/options.cpp @@ -93,10 +93,10 @@ INT_PTR CALLBACK OptsPopupsDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp ppd.lchIcon = Skin_LoadProtoIcon(NULL, idBack); GetDlgItemText(hdlg, IDC_POPUPSTAMP, szstamp, _countof(szstamp)); - _tcsncpy(ppd.lptzContactName, ParseString(szstamp, NULL, 0), MAX_CONTACTNAME); + _tcsncpy(ppd.lptzContactName, ParseString(szstamp, NULL), MAX_CONTACTNAME); GetDlgItemText(hdlg, IDC_POPUPSTAMPTEXT, szstamp, _countof(szstamp)); - _tcsncpy(ppd.lptzText, ParseString(szstamp, NULL, 0), MAX_SECONDLINE); + _tcsncpy(ppd.lptzText, ParseString(szstamp, NULL), MAX_SECONDLINE); PUAddPopupT(&ppd); SendMessage(GetParent(hdlg), PSM_CHANGED, 0, 0); diff --git a/plugins/SeenPlugin/src/stdafx.h b/plugins/SeenPlugin/src/stdafx.h index 4b703c9eb2..09aac51737 100644 --- a/plugins/SeenPlugin/src/stdafx.h +++ b/plugins/SeenPlugin/src/stdafx.h @@ -93,7 +93,7 @@ typedef struct{ } MISSEDCONTACTS; int IsWatchedProtocol(const char* szProto); -TCHAR *ParseString(TCHAR*, MCONTACT, BYTE); +TCHAR *ParseString(TCHAR*, MCONTACT); void GetColorsFromDWord(LPCOLORREF First, LPCOLORREF Second, DWORD colDword); DWORD GetDWordFromColors(COLORREF First, COLORREF Second); int OptionsInit(WPARAM,LPARAM); diff --git a/plugins/SeenPlugin/src/userinfo.cpp b/plugins/SeenPlugin/src/userinfo.cpp index dc94193927..25844a0435 100644 --- a/plugins/SeenPlugin/src/userinfo.cpp +++ b/plugins/SeenPlugin/src/userinfo.cpp @@ -42,7 +42,7 @@ INT_PTR CALLBACK UserinfoDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lpar case WM_REFRESH_UI: { ptrT szout(db_get_tsa(NULL, S_MOD, "UserStamp")); - TCHAR *str = ParseString((szout != NULL) ? szout : DEFAULT_USERSTAMP, wparam, 0); + TCHAR *str = ParseString((szout != NULL) ? szout : DEFAULT_USERSTAMP, wparam); SetDlgItemText(hdlg, IDC_INFOTEXT, str); if (!mir_tstrcmp(str, TranslateT(""))) diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp index e57c451cd4..a1f5e80995 100644 --- a/plugins/SeenPlugin/src/utils.cpp +++ b/plugins/SeenPlugin/src/utils.cpp @@ -146,7 +146,7 @@ TCHAR *wdays_short[] = { LPGENT("Sun."), LPGENT("Mon."), LPGENT("Tue."), LPGENT( TCHAR *monthnames[] = { LPGENT("January"), LPGENT("February"), LPGENT("March"), LPGENT("April"), LPGENT("May"), LPGENT("June"), LPGENT("July"), LPGENT("August"), LPGENT("September"), LPGENT("October"), LPGENT("November"), LPGENT("December") }; TCHAR *mnames_short[] = { LPGENT("Jan."), LPGENT("Feb."), LPGENT("Mar."), LPGENT("Apr."), LPGENT("May"), LPGENT("Jun."), LPGENT("Jul."), LPGENT("Aug."), LPGENT("Sep."), LPGENT("Oct."), LPGENT("Nov."), LPGENT("Dec.") }; -TCHAR *ParseString(TCHAR *szstring, MCONTACT hcontact, BYTE isfile) +TCHAR* ParseString(TCHAR *szstring, MCONTACT hcontact) { #define MAXSIZE 1024 static TCHAR sztemp[MAXSIZE + 1]; @@ -496,16 +496,16 @@ void ShowPopup(MCONTACT hcontact, const char * lpzProto, int newStatus) ppd.lchIcon = Skin_LoadProtoIcon(lpzProto, newStatus); if (!db_get_ts(NULL, S_MOD, "PopupStamp", &dbv)) { - _tcsncpy(ppd.lptzContactName, ParseString(dbv.ptszVal, hcontact, 0), MAX_CONTACTNAME); + _tcsncpy(ppd.lptzContactName, ParseString(dbv.ptszVal, hcontact), MAX_CONTACTNAME); db_free(&dbv); } - else _tcsncpy(ppd.lptzContactName, ParseString(DEFAULT_POPUPSTAMP, hcontact, 0), MAX_CONTACTNAME); + else _tcsncpy(ppd.lptzContactName, ParseString(DEFAULT_POPUPSTAMP, hcontact), MAX_CONTACTNAME); if (!db_get_ts(NULL, S_MOD, "PopupStampText", &dbv)) { - _tcsncpy(ppd.lptzText, ParseString(dbv.ptszVal, hcontact, 0), MAX_SECONDLINE); + _tcsncpy(ppd.lptzText, ParseString(dbv.ptszVal, hcontact), MAX_SECONDLINE); db_free(&dbv); } - else _tcsncpy(ppd.lptzText, ParseString(DEFAULT_POPUPSTAMPTEXT, hcontact, 0), MAX_SECONDLINE); + else _tcsncpy(ppd.lptzText, ParseString(DEFAULT_POPUPSTAMPTEXT, hcontact), MAX_SECONDLINE); ppd.PluginWindowProc = PopupDlgProc; PUAddPopupT(&ppd); } @@ -678,7 +678,7 @@ static void cleanThread(void *param) mir_free(infoParam); } -int ModeChange(WPARAM wparam, LPARAM lparam) +int ModeChange(WPARAM, LPARAM lparam) { ACKDATA *ack = (ACKDATA *)lparam; -- cgit v1.2.3