From 6895d635acb37ba42e53ba95ca3eee2ddbbef24d Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Fri, 28 Nov 2014 21:19:14 +0000 Subject: Massive code cleanup and fixes for a lot of warnings reported in #837 git-svn-id: http://svn.miranda-ng.org/main/trunk@11136 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/chat/tools.cpp | 2 +- src/modules/fonts/FontOptions.cpp | 6 +++--- src/modules/metacontacts/meta_edit.cpp | 2 +- src/modules/protocols/protoopts.cpp | 3 +-- 4 files changed, 6 insertions(+), 7 deletions(-) (limited to 'src/modules') diff --git a/src/modules/chat/tools.cpp b/src/modules/chat/tools.cpp index ae118c1cb2..527b6307ac 100644 --- a/src/modules/chat/tools.cpp +++ b/src/modules/chat/tools.cpp @@ -128,7 +128,7 @@ BOOL DoTrayIcon(SESSION_INFO *si, GCEVENT *gce) ///////////////////////////////////////////////////////////////////////////////////////// -static void __stdcall ShowRoomFromPopup(void * pi) +static void __stdcall ShowRoomFromPopup(void *pi) { SESSION_INFO *si = (SESSION_INFO*)pi; ci.ShowRoom(si, WINDOW_VISIBLE, TRUE); diff --git a/src/modules/fonts/FontOptions.cpp b/src/modules/fonts/FontOptions.cpp index 20fb53871a..4d72a7d8bb 100644 --- a/src/modules/fonts/FontOptions.cpp +++ b/src/modules/fonts/FontOptions.cpp @@ -176,14 +176,14 @@ BOOL ExportSettings(HWND hwndDlg, TCHAR *filename, OBJLIST& flist, SelectObject(hdc, hOldFont); DeleteObject(hFont); - strncat(buff, _itoa((BYTE)size.cy, abuff, 10), SIZEOF(buff)); + strncat(buff, _itoa((BYTE)size.cy, abuff, 10), sizeof(buff)); } else if (F.flags & FIDF_SAVEPOINTSIZE) { HDC hdc = GetDC(hwndDlg); - strncat(buff, _itoa((BYTE)-MulDiv(F.value.size, 72, GetDeviceCaps(hdc, LOGPIXELSY)), abuff, 10), SIZEOF(buff)); + strncat(buff, _itoa((BYTE)-MulDiv(F.value.size, 72, GetDeviceCaps(hdc, LOGPIXELSY)), abuff, 10), sizeof(buff)); ReleaseDC(hwndDlg, hdc); } - else strncat(buff, _itoa((BYTE)F.value.size, abuff, 10), SIZEOF(buff)); + else strncat(buff, _itoa((BYTE)F.value.size, abuff, 10), sizeof(buff)); WriteLine(fhand, buff); diff --git a/src/modules/metacontacts/meta_edit.cpp b/src/modules/metacontacts/meta_edit.cpp index 20bbf3680d..245ca22fde 100644 --- a/src/modules/metacontacts/meta_edit.cpp +++ b/src/modules/metacontacts/meta_edit.cpp @@ -293,7 +293,7 @@ static INT_PTR CALLBACK Meta_EditDialogProc(HWND hwndDlg, UINT msg, WPARAM wPara HWND hwndOffline = GetDlgItem(hwndDlg, IDC_BTN_SETOFFLINE); EnableWindow(hwndOffline, sel != -1); - SetWindowText(hwndOffline, TranslateTS((sel != -1 && g_data.hContact[sel] != g_data.hOfflineContact) ? LPGENT("Send &offline") : LPGENT("Send &online"))); + SetWindowText(hwndOffline, (sel != -1 && g_data.hContact[sel] != g_data.hOfflineContact) ? TranslateT("Send &offline") : TranslateT("Send &online")); } } break; diff --git a/src/modules/protocols/protoopts.cpp b/src/modules/protocols/protoopts.cpp index ce801ca8fe..4b5c6eba6d 100644 --- a/src/modules/protocols/protoopts.cpp +++ b/src/modules/protocols/protoopts.cpp @@ -851,8 +851,7 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM TCHAR buf[200]; mir_sntprintf(buf, SIZEOF(buf), TranslateT("Account %s is being deleted"), pa->tszAccountName); if (pa->bOldProto) { - MessageBox(hwndDlg, TranslateT("You need to disable plugin to delete this account"), buf, - MB_ICONERROR | MB_OK); + MessageBox(hwndDlg, TranslateT("You need to disable plugin to delete this account"), buf, MB_ICONERROR | MB_OK); break; } if (IDYES == MessageBox(hwndDlg, errMsg, buf, MB_ICONWARNING | MB_DEFBUTTON2 | MB_YESNO)) { -- cgit v1.2.3