diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2014-12-14 15:09:23 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2014-12-14 15:09:23 +0000 |
commit | 8c538dbff915b405d9b41fe51ca78618a78cf46d (patch) | |
tree | dbdbd9c3aeaab9be9f1b4253d0ec45a250a6f43e /plugins/DbChecker/src | |
parent | 100f19d51ba640c183c651426555145e8f9f2014 (diff) |
DbChecker: changed warning lavel to w4
git-svn-id: http://svn.miranda-ng.org/main/trunk@11413 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/DbChecker/src')
-rw-r--r-- | plugins/DbChecker/src/cleaning.cpp | 2 | ||||
-rw-r--r-- | plugins/DbChecker/src/main.cpp | 10 | ||||
-rw-r--r-- | plugins/DbChecker/src/openerror.cpp | 22 | ||||
-rw-r--r-- | plugins/DbChecker/src/progress.cpp | 86 | ||||
-rw-r--r-- | plugins/DbChecker/src/selectdb.cpp | 68 | ||||
-rw-r--r-- | plugins/DbChecker/src/welcome.cpp | 44 | ||||
-rw-r--r-- | plugins/DbChecker/src/wizard.cpp | 6 | ||||
-rw-r--r-- | plugins/DbChecker/src/worker.cpp | 2 |
8 files changed, 120 insertions, 120 deletions
diff --git a/plugins/DbChecker/src/cleaning.cpp b/plugins/DbChecker/src/cleaning.cpp index d96c960b24..c7c504a37d 100644 --- a/plugins/DbChecker/src/cleaning.cpp +++ b/plugins/DbChecker/src/cleaning.cpp @@ -7,7 +7,7 @@ modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
+This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
diff --git a/plugins/DbChecker/src/main.cpp b/plugins/DbChecker/src/main.cpp index ffd53b4b23..6f9cc48fbc 100644 --- a/plugins/DbChecker/src/main.cpp +++ b/plugins/DbChecker/src/main.cpp @@ -24,7 +24,7 @@ int hLangpack = 0; bool bServiceMode, bLaunchMiranda, bShortMode;
HANDLE hService;
-DbToolOptions opts = {0};
+DbToolOptions opts = { 0 };
PLUGININFOEX pluginInfoEx =
{
@@ -38,24 +38,24 @@ PLUGININFOEX pluginInfoEx = __AUTHORWEB,
UNICODE_AWARE | STATIC_PLUGIN,
// {A0138FC6-4C52-4501-AF93-7D3E20BCAE5B}
- {0xa0138fc6, 0x4c52, 0x4501, {0xaf, 0x93, 0x7d, 0x3e, 0x20, 0xbc, 0xae, 0x5b}}
+ { 0xa0138fc6, 0x4c52, 0x4501, { 0xaf, 0x93, 0x7d, 0x3e, 0x20, 0xbc, 0xae, 0x5b } }
};
/////////////////////////////////////////////////////////////////////////////////////////
-BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID)
{
hInst = hinstDLL;
return TRUE;
}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
+extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
return &pluginInfoEx;
}
// we implement service mode interface
-extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_SERVICEMODE, MIID_LAST};
+extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SERVICEMODE, MIID_LAST };
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/DbChecker/src/openerror.cpp b/plugins/DbChecker/src/openerror.cpp index 26a41520f1..a387249b5b 100644 --- a/plugins/DbChecker/src/openerror.cpp +++ b/plugins/DbChecker/src/openerror.cpp @@ -7,7 +7,7 @@ modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
+This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@@ -27,16 +27,16 @@ INT_PTR CALLBACK OpenErrorDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM switch (message) {
case WM_INITDIALOG:
- {
- TCHAR szError[256];
- FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, opts.error, 0, szError, SIZEOF(szError), NULL);
- SetDlgItemText(hdlg, IDC_ERRORTEXT, szError);
- }
- if (opts.error == ERROR_SHARING_VIOLATION) ShowWindow(GetDlgItem(hdlg, IDC_INUSE), SW_SHOW);
- SetWindowLongPtr(GetDlgItem(hdlg, IDC_FILE), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hdlg, IDC_FILE), GWL_STYLE) | SS_PATHELLIPSIS);
- TranslateDialogDefault(hdlg);
- SetDlgItemText(hdlg, IDC_FILE, opts.filename);
- return TRUE;
+ {
+ TCHAR szError[256];
+ FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, opts.error, 0, szError, SIZEOF(szError), NULL);
+ SetDlgItemText(hdlg, IDC_ERRORTEXT, szError);
+ }
+ if (opts.error == ERROR_SHARING_VIOLATION) ShowWindow(GetDlgItem(hdlg, IDC_INUSE), SW_SHOW);
+ SetWindowLongPtr(GetDlgItem(hdlg, IDC_FILE), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hdlg, IDC_FILE), GWL_STYLE) | SS_PATHELLIPSIS);
+ TranslateDialogDefault(hdlg);
+ SetDlgItemText(hdlg, IDC_FILE, opts.filename);
+ return TRUE;
case WM_COMMAND:
switch (LOWORD(wParam)) {
diff --git a/plugins/DbChecker/src/progress.cpp b/plugins/DbChecker/src/progress.cpp index a694ce9369..a01591b805 100644 --- a/plugins/DbChecker/src/progress.cpp +++ b/plugins/DbChecker/src/progress.cpp @@ -7,7 +7,7 @@ modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
+This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@@ -42,10 +42,10 @@ void AddToStatus(int flags, const TCHAR* fmt, ...) InvalidateRect(hwndStatus, NULL, FALSE);
SendMessage(hwndStatus, LB_SETTOPINDEX, i, 0);
- #ifdef _DEBUG
- OutputDebugString(str);
- OutputDebugStringA("\n");
- #endif
+#ifdef _DEBUG
+ OutputDebugString(str);
+ OutputDebugStringA("\n");
+#endif
switch (flags & STATUS_CLASSMASK) {
case STATUS_ERROR:
@@ -74,7 +74,7 @@ INT_PTR CALLBACK ProgressDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM if (DoMyControlProcessing(hdlg, message, wParam, lParam, &bReturn))
return bReturn;
- switch(message) {
+ switch (message) {
case WM_INITDIALOG:
EnableWindow(GetDlgItem(GetParent(hdlg), IDOK), FALSE);
hdlgProgress = hdlg;
@@ -112,45 +112,45 @@ INT_PTR CALLBACK ProgressDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM return TRUE;
case WM_MEASUREITEM:
- {
- LPMEASUREITEMSTRUCT mis = (LPMEASUREITEMSTRUCT)lParam;
- mis->itemWidth = listWidth;
- mis->itemHeight = fontHeight;
- }
- return TRUE;
+ {
+ LPMEASUREITEMSTRUCT mis = (LPMEASUREITEMSTRUCT)lParam;
+ mis->itemWidth = listWidth;
+ mis->itemHeight = fontHeight;
+ }
+ return TRUE;
case WM_DRAWITEM:
- {
- LPDRAWITEMSTRUCT dis = (LPDRAWITEMSTRUCT)lParam;
- TCHAR str[256];
- int bold = 0;
- HFONT hoFont;
- if ((int)dis->itemID == -1) break;
- SendMessage(dis->hwndItem, LB_GETTEXT, dis->itemID, (LPARAM)str);
- switch(dis->itemData & STATUS_CLASSMASK) {
- case STATUS_MESSAGE:
- SetTextColor(dis->hDC, RGB(0, 0, 0));
- break;
- case STATUS_WARNING:
- SetTextColor(dis->hDC, RGB(192, 128, 0));
- break;
- case STATUS_ERROR:
- SetTextColor(dis->hDC, RGB(192, 0, 0));
- break;
- case STATUS_FATAL:
- bold = 1;
- SetTextColor(dis->hDC, RGB(192, 0, 0));
- break;
- case STATUS_SUCCESS:
- bold = 1;
- SetTextColor(dis->hDC, RGB(0, 192, 0));
- break;
- }
- if (bold) hoFont = (HFONT)SelectObject(dis->hDC, hBoldFont);
- ExtTextOut(dis->hDC, dis->rcItem.left, dis->rcItem.top, ETO_CLIPPED|ETO_OPAQUE, &dis->rcItem, str, (UINT)_tcslen(str), NULL);
- if (bold) SelectObject(dis->hDC, hoFont);
+ {
+ LPDRAWITEMSTRUCT dis = (LPDRAWITEMSTRUCT)lParam;
+ TCHAR str[256];
+ int bold = 0;
+ HFONT hoFont = NULL;
+ if ((int)dis->itemID == -1) break;
+ SendMessage(dis->hwndItem, LB_GETTEXT, dis->itemID, (LPARAM)str);
+ switch (dis->itemData & STATUS_CLASSMASK) {
+ case STATUS_MESSAGE:
+ SetTextColor(dis->hDC, RGB(0, 0, 0));
+ break;
+ case STATUS_WARNING:
+ SetTextColor(dis->hDC, RGB(192, 128, 0));
+ break;
+ case STATUS_ERROR:
+ SetTextColor(dis->hDC, RGB(192, 0, 0));
+ break;
+ case STATUS_FATAL:
+ bold = 1;
+ SetTextColor(dis->hDC, RGB(192, 0, 0));
+ break;
+ case STATUS_SUCCESS:
+ bold = 1;
+ SetTextColor(dis->hDC, RGB(0, 192, 0));
+ break;
}
- return TRUE;
+ if (bold) hoFont = (HFONT)SelectObject(dis->hDC, hBoldFont);
+ ExtTextOut(dis->hDC, dis->rcItem.left, dis->rcItem.top, ETO_CLIPPED | ETO_OPAQUE, &dis->rcItem, str, (UINT)_tcslen(str), NULL);
+ if (bold) SelectObject(dis->hDC, hoFont);
+ }
+ return TRUE;
case WM_PROCESSINGDONE:
SetProgressBar(1000);
@@ -202,7 +202,7 @@ INT_PTR CALLBACK ProgressDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM return TRUE;
case WM_COMMAND:
- switch(LOWORD(wParam)) {
+ switch (LOWORD(wParam)) {
case IDC_BACK:
ResetEvent(hEventRun);
if (!IsWindowEnabled(GetDlgItem(GetParent(hdlg), IDOK))) {
diff --git a/plugins/DbChecker/src/selectdb.cpp b/plugins/DbChecker/src/selectdb.cpp index 7c19dba2db..56dd69c269 100644 --- a/plugins/DbChecker/src/selectdb.cpp +++ b/plugins/DbChecker/src/selectdb.cpp @@ -39,7 +39,7 @@ int OpenDatabase(HWND hdlg, INT iNextPage) mir_sntprintf(tszMsg, SIZEOF(tszMsg),
TranslateT("Database Checker cannot find a suitable database plugin to open '%s'."),
opts.filename);
-LBL_Error:
+ LBL_Error:
MessageBox(hdlg, tszMsg, TranslateT("Error"), MB_OK | MB_ICONERROR);
return false;
}
@@ -257,39 +257,39 @@ INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM break;
case IDC_OTHER:
- {
- OPENFILENAME ofn = { 0 };
- TCHAR str[MAX_PATH];
-
- // _T("Miranda Databases (*.dat)\0*.DAT\0All Files (*)\0*\0");
- TCHAR *filter, *tmp, *tmp1, *tmp2;
- tmp1 = TranslateT("Miranda Databases (*.dat)");
- tmp2 = TranslateT("All Files");
- filter = tmp = (TCHAR*)_alloca((_tcslen(tmp1) + _tcslen(tmp2) + 11)*sizeof(TCHAR));
- tmp = addstring(tmp, tmp1);
- tmp = addstring(tmp, _T("*.DAT"));
- tmp = addstring(tmp, tmp2);
- tmp = addstring(tmp, _T("*"));
- *tmp = 0;
-
- GetDlgItemText(hdlg, IDC_FILE, str, SIZEOF(str));
- ofn.lStructSize = sizeof(ofn);
- ofn.hwndOwner = hdlg;
- ofn.hInstance = NULL;
- ofn.lpstrFilter = filter;
- ofn.lpstrDefExt = _T("dat");
- ofn.lpstrFile = str;
- ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
- ofn.nMaxFile = SIZEOF(str);
- ofn.nMaxFileTitle = MAX_PATH;
- if (GetOpenFileName(&ofn)) {
- int i = AddDatabaseToList(GetDlgItem(hdlg, IDC_DBLIST), str, _T(""));
- if (i == -1)
- i = 0;
- ListView_SetItemState(GetDlgItem(hdlg, IDC_DBLIST), i, LVIS_SELECTED, LVIS_SELECTED);
- }
+ {
+ OPENFILENAME ofn = { 0 };
+ TCHAR str[MAX_PATH];
+
+ // _T("Miranda Databases (*.dat)\0*.DAT\0All Files (*)\0*\0");
+ TCHAR *filter, *tmp, *tmp1, *tmp2;
+ tmp1 = TranslateT("Miranda Databases (*.dat)");
+ tmp2 = TranslateT("All Files");
+ filter = tmp = (TCHAR*)_alloca((_tcslen(tmp1) + _tcslen(tmp2) + 11)*sizeof(TCHAR));
+ tmp = addstring(tmp, tmp1);
+ tmp = addstring(tmp, _T("*.DAT"));
+ tmp = addstring(tmp, tmp2);
+ tmp = addstring(tmp, _T("*"));
+ *tmp = 0;
+
+ GetDlgItemText(hdlg, IDC_FILE, str, SIZEOF(str));
+ ofn.lStructSize = sizeof(ofn);
+ ofn.hwndOwner = hdlg;
+ ofn.hInstance = NULL;
+ ofn.lpstrFilter = filter;
+ ofn.lpstrDefExt = _T("dat");
+ ofn.lpstrFile = str;
+ ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
+ ofn.nMaxFile = SIZEOF(str);
+ ofn.nMaxFileTitle = MAX_PATH;
+ if (GetOpenFileName(&ofn)) {
+ int i = AddDatabaseToList(GetDlgItem(hdlg, IDC_DBLIST), str, _T(""));
+ if (i == -1)
+ i = 0;
+ ListView_SetItemState(GetDlgItem(hdlg, IDC_DBLIST), i, LVIS_SELECTED, LVIS_SELECTED);
}
- break;
+ }
+ break;
case IDC_BACK:
if (!bShortMode)
@@ -328,7 +328,7 @@ INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM free((char*)lvi.lParam);
}
}
- break;
+ break;
}
return FALSE;
}
diff --git a/plugins/DbChecker/src/welcome.cpp b/plugins/DbChecker/src/welcome.cpp index a929f5f97c..fde9b6f112 100644 --- a/plugins/DbChecker/src/welcome.cpp +++ b/plugins/DbChecker/src/welcome.cpp @@ -30,29 +30,29 @@ INT_PTR CALLBACK WelcomeDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM l switch (message) {
case WM_INITDIALOG:
- {
- HRSRC hRsrcWatermark = FindResourceA(hInst, MAKEINTRESOURCEA(IDE_WATERMARK), "EMF");
- HGLOBAL hGlobWatermark = LoadResource(hInst, hRsrcWatermark);
- hEmfWatermark = SetEnhMetaFileBits(SizeofResource(hInst, hRsrcWatermark), (PBYTE)LockResource(hGlobWatermark));
- }
- SendDlgItemMessage(hdlg, IDC_WATERMARK, STM_SETIMAGE, IMAGE_ENHMETAFILE, (LPARAM)hEmfWatermark);
- {
- NONCLIENTMETRICS ncm = { 0 };
- ncm.cbSize = sizeof(ncm);
- SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &ncm, 0);
- LOGFONT TitleLogFont = ncm.lfMessageFont;
- TitleLogFont.lfWeight = FW_BOLD;
- mir_tstrcpy(TitleLogFont.lfFaceName, TEXT("Verdana Bold"));
+ {
+ HRSRC hRsrcWatermark = FindResourceA(hInst, MAKEINTRESOURCEA(IDE_WATERMARK), "EMF");
+ HGLOBAL hGlobWatermark = LoadResource(hInst, hRsrcWatermark);
+ hEmfWatermark = SetEnhMetaFileBits(SizeofResource(hInst, hRsrcWatermark), (PBYTE)LockResource(hGlobWatermark));
+ }
+ SendDlgItemMessage(hdlg, IDC_WATERMARK, STM_SETIMAGE, IMAGE_ENHMETAFILE, (LPARAM)hEmfWatermark);
+ {
+ NONCLIENTMETRICS ncm = { 0 };
+ ncm.cbSize = sizeof(ncm);
+ SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &ncm, 0);
+ LOGFONT TitleLogFont = ncm.lfMessageFont;
+ TitleLogFont.lfWeight = FW_BOLD;
+ mir_tstrcpy(TitleLogFont.lfFaceName, TEXT("Verdana Bold"));
- HDC hdc = GetDC(NULL);
- INT FontSize = 12;
- TitleLogFont.lfHeight = 0 - GetDeviceCaps(hdc, LOGPIXELSY) * FontSize / 72;
- hTitleFont = CreateFontIndirect(&TitleLogFont);
- ReleaseDC(NULL, hdc);
- }
- SendDlgItemMessage(hdlg, IDC_TITLE, WM_SETFONT, (WPARAM)hTitleFont, 0);
- EnableWindow(GetDlgItem(GetParent(hdlg), IDC_BACK), FALSE);
- return FALSE;
+ HDC hdc = GetDC(NULL);
+ INT FontSize = 12;
+ TitleLogFont.lfHeight = 0 - GetDeviceCaps(hdc, LOGPIXELSY) * FontSize / 72;
+ hTitleFont = CreateFontIndirect(&TitleLogFont);
+ ReleaseDC(NULL, hdc);
+ }
+ SendDlgItemMessage(hdlg, IDC_TITLE, WM_SETFONT, (WPARAM)hTitleFont, 0);
+ EnableWindow(GetDlgItem(GetParent(hdlg), IDC_BACK), FALSE);
+ return FALSE;
case WM_COMMAND:
switch (LOWORD(wParam)) {
diff --git a/plugins/DbChecker/src/wizard.cpp b/plugins/DbChecker/src/wizard.cpp index 7eec2f9434..fa2d8951a7 100644 --- a/plugins/DbChecker/src/wizard.cpp +++ b/plugins/DbChecker/src/wizard.cpp @@ -1,7 +1,7 @@ /*
Miranda Database Tool
-Copyright 2000-2011 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright 2000-2011 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static HFONT hBoldFont = NULL;
static HENHMETAFILE hEmfHeaderLogo = NULL;
-static BOOL CALLBACK MyControlsEnumChildren(HWND hwnd, LPARAM lParam)
+static BOOL CALLBACK MyControlsEnumChildren(HWND hwnd, LPARAM)
{
DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
DWORD exstyle = GetWindowLongPtr(hwnd, GWL_EXSTYLE);
diff --git a/plugins/DbChecker/src/worker.cpp b/plugins/DbChecker/src/worker.cpp index 4c7137f9b6..6d7dd5fe14 100644 --- a/plugins/DbChecker/src/worker.cpp +++ b/plugins/DbChecker/src/worker.cpp @@ -72,7 +72,7 @@ static void Finalize(time_t& ts) AddToStatus(STATUS_WARNING, TranslateT("Unable to rename output file"));
}
-void __cdecl WorkerThread(void *unused)
+void __cdecl WorkerThread(void *)
{
int task, firstTime;
time_t ts = time(NULL);
|