diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2014-12-14 14:52:25 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2014-12-14 14:52:25 +0000 |
commit | ad9ea188764830dad666490867c07a9891b7e854 (patch) | |
tree | a06e77f6a660082423bdd1f10253ba97eddb32a2 /plugins/CrashDumper | |
parent | 67a6632c79ee755a468b2d2bd28d470104f2b4da (diff) |
CrashDumper: changed warning lavel to w4
git-svn-id: http://svn.miranda-ng.org/main/trunk@11410 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/CrashDumper')
-rw-r--r-- | plugins/CrashDumper/crshdmp_12.vcxproj | 8 | ||||
-rw-r--r-- | plugins/CrashDumper/src/crshdmp.cpp | 10 | ||||
-rw-r--r-- | plugins/CrashDumper/src/crshdmp_icons.cpp | 14 | ||||
-rw-r--r-- | plugins/CrashDumper/src/dumper.cpp | 10 | ||||
-rw-r--r-- | plugins/CrashDumper/src/exhndlr.cpp | 2 | ||||
-rw-r--r-- | plugins/CrashDumper/src/ui.cpp | 84 | ||||
-rw-r--r-- | plugins/CrashDumper/src/upload.cpp | 6 | ||||
-rw-r--r-- | plugins/CrashDumper/src/utils.cpp | 2 | ||||
-rw-r--r-- | plugins/CrashDumper/src/utils.h | 6 |
9 files changed, 70 insertions, 72 deletions
diff --git a/plugins/CrashDumper/crshdmp_12.vcxproj b/plugins/CrashDumper/crshdmp_12.vcxproj index 895acadfe6..25b860eef5 100644 --- a/plugins/CrashDumper/crshdmp_12.vcxproj +++ b/plugins/CrashDumper/crshdmp_12.vcxproj @@ -85,7 +85,7 @@ <BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>false</FunctionLevelLinking>
<FloatingPointModel>Fast</FloatingPointModel>
- <WarningLevel>Level3</WarningLevel>
+ <WarningLevel>Level4</WarningLevel>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>utils.h</PrecompiledHeaderFile>
@@ -118,7 +118,7 @@ <BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>false</FunctionLevelLinking>
<FloatingPointModel>Fast</FloatingPointModel>
- <WarningLevel>Level3</WarningLevel>
+ <WarningLevel>Level4</WarningLevel>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>utils.h</PrecompiledHeaderFile>
@@ -148,7 +148,7 @@ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<FloatingPointModel>Fast</FloatingPointModel>
- <WarningLevel>Level3</WarningLevel>
+ <WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<ExceptionHandling>false</ExceptionHandling>
<PrecompiledHeader>Use</PrecompiledHeader>
@@ -178,7 +178,7 @@ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<FloatingPointModel>Fast</FloatingPointModel>
- <WarningLevel>Level3</WarningLevel>
+ <WarningLevel>Level4</WarningLevel>
<ExceptionHandling>false</ExceptionHandling>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>utils.h</PrecompiledHeaderFile>
diff --git a/plugins/CrashDumper/src/crshdmp.cpp b/plugins/CrashDumper/src/crshdmp.cpp index e517913700..e66d7796ae 100644 --- a/plugins/CrashDumper/src/crshdmp.cpp +++ b/plugins/CrashDumper/src/crshdmp.cpp @@ -191,8 +191,8 @@ static int FoldersPathChanged(WPARAM, LPARAM) fgd.cbSize = sizeof(FOLDERSGETDATA);
fgd.nMaxPathSize = MAX_PATH;
fgd.flags = FF_TCHAR;
-// fgd.szPathT = CrashLogFolder;
-// CallService(MS_FOLDERS_GET_PATH, (WPARAM)hCrashLogFolder, (LPARAM)&fgd);
+ // fgd.szPathT = CrashLogFolder;
+ // CallService(MS_FOLDERS_GET_PATH, (WPARAM)hCrashLogFolder, (LPARAM)&fgd);
fgd.szPathT = VersionInfoFolder;
CallService(MS_FOLDERS_GET_PATH, (WPARAM)hVerInfoFolder, (LPARAM)&fgd);
@@ -250,7 +250,7 @@ static int ModulesLoaded(WPARAM, LPARAM) replaceStrT(profpath, _T("%miranda_userdata%"));
// Removed because it isn't available on Load()
-// hCrashLogFolder = FoldersRegisterCustomPathT(PluginName, LPGEN("Crash Reports"), CrashLogFolder);
+ // hCrashLogFolder = FoldersRegisterCustomPathT(PluginName, LPGEN("Crash Reports"), CrashLogFolder);
hVerInfoFolder = FoldersRegisterCustomPathT(PluginName, LPGEN("Version Information"), VersionInfoFolder);
HookEvent(ME_FOLDERS_PATH_CHANGED, FoldersPathChanged);
@@ -337,7 +337,7 @@ static int ModulesLoaded(WPARAM, LPARAM) hk.pszName = "ShowVerInfo";
hk.pszService = MS_CRASHDUMPER_VIEWINFO;
Hotkey_Register(&hk);
-
+
UploadInit();
if (catchcrashes && !needrestart)
@@ -413,7 +413,7 @@ extern "C" int __declspec(dllexport) Unload(void) return 0;
}
-extern "C" BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID /*lpvReserved*/)
+extern "C" BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID)
{
hInst = hinstDLL;
return TRUE;
diff --git a/plugins/CrashDumper/src/crshdmp_icons.cpp b/plugins/CrashDumper/src/crshdmp_icons.cpp index ff6f23520a..faf7298705 100644 --- a/plugins/CrashDumper/src/crshdmp_icons.cpp +++ b/plugins/CrashDumper/src/crshdmp_icons.cpp @@ -20,12 +20,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. static IconItem iconList[] =
{
- { LPGEN("Version Information"), "versionInfo", IDI_VI },
- { LPGEN("Copy To Clipboard"), "storeToClip", IDI_VITOCLIP },
- { LPGEN("Store to file"), "storeToFile", IDI_VITOFILE },
- { LPGEN("Show"), "showInfo", IDI_VISHOW },
- { LPGEN("Upload"), "uploadInfo", IDI_VIUPLOAD },
- { LPGEN("Copy link to clipboard"), "linkToClip", IDI_LINKTOCLIP},
+ { LPGEN("Version Information"), "versionInfo", IDI_VI },
+ { LPGEN("Copy To Clipboard"), "storeToClip", IDI_VITOCLIP },
+ { LPGEN("Store to file"), "storeToFile", IDI_VITOFILE },
+ { LPGEN("Show"), "showInfo", IDI_VISHOW },
+ { LPGEN("Upload"), "uploadInfo", IDI_VIUPLOAD },
+ { LPGEN("Copy link to clipboard"), "linkToClip", IDI_LINKTOCLIP },
};
void InitIcons(void)
@@ -37,7 +37,7 @@ HICON LoadIconEx(int iconId, bool big) {
for (int i = 0; i < SIZEOF(iconList); i++)
if (iconList[i].defIconID == iconId)
- return Skin_GetIconByHandle(iconList[i].hIcolib);
+ return Skin_GetIconByHandle(iconList[i].hIcolib, big);
return NULL;
}
diff --git a/plugins/CrashDumper/src/dumper.cpp b/plugins/CrashDumper/src/dumper.cpp index 4418b40111..99317570b1 100644 --- a/plugins/CrashDumper/src/dumper.cpp +++ b/plugins/CrashDumper/src/dumper.cpp @@ -250,7 +250,6 @@ static void GetPluginsString(CMString& buffer, unsigned& flags) ListItem* lsttmp = dlllist;
ListItem* lsttmppv = NULL;
while (lsttmp != NULL) {
- size_t sz = min(lsttmp->str.GetLength(), lst->str.GetLength()) - 2;
if (lsttmp->str.CompareNoCase(lst->str) > 0)
break;
lsttmppv = lsttmp;
@@ -268,8 +267,7 @@ static void GetPluginsString(CMString& buffer, unsigned& flags) ++count;
}
if (loaded) FreeLibrary(hModule);
- }
- while (FindNextFile(hFind, &FindFileData));
+ } while (FindNextFile(hFind, &FindFileData));
FindClose(hFind);
buffer.AppendFormat(TEXT("\r\n%sActive Plugins (%u):%s\r\n"),
@@ -411,8 +409,7 @@ static void GetWeatherStrings(CMString& buffer, unsigned flags) timebuf, id);
CloseHandle(hDumpFile);
}
- }
- while (FindNextFile(hFind, &FindFileData));
+ } while (FindNextFile(hFind, &FindFileData));
FindClose(hFind);
}
@@ -437,8 +434,7 @@ static void GetIconStrings(CMString& buffer) GetLastWriteTime(&FindFileData.ftLastWriteTime, timebuf, 30);
buffer.AppendFormat(TEXT(" %s [%s]\r\n"), FindFileData.cFileName, timebuf);
- }
- while (FindNextFile(hFind, &FindFileData));
+ } while (FindNextFile(hFind, &FindFileData));
FindClose(hFind);
}
diff --git a/plugins/CrashDumper/src/exhndlr.cpp b/plugins/CrashDumper/src/exhndlr.cpp index eee0478be5..e44f72c5ed 100644 --- a/plugins/CrashDumper/src/exhndlr.cpp +++ b/plugins/CrashDumper/src/exhndlr.cpp @@ -1,7 +1,7 @@ #include "utils.h"
#ifndef FACILITY_VISUALCPP
- #define FACILITY_VISUALCPP ((LONG)0x6d)
+#define FACILITY_VISUALCPP ((LONG)0x6d)
#endif
static PVOID exchndlr, exchndlrv;
diff --git a/plugins/CrashDumper/src/ui.cpp b/plugins/CrashDumper/src/ui.cpp index a34c128bdb..546c94cab6 100644 --- a/plugins/CrashDumper/src/ui.cpp +++ b/plugins/CrashDumper/src/ui.cpp @@ -100,12 +100,12 @@ INT_PTR CALLBACK DlgProcView(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara break;
case WM_GETMINMAXINFO:
- {
- LPMINMAXINFO mmi = (LPMINMAXINFO)lParam;
- mmi->ptMinTrackSize.x = 400; // The minimum width in points
- mmi->ptMinTrackSize.y = 300; // The minimum height in points
- }
- break;
+ {
+ LPMINMAXINFO mmi = (LPMINMAXINFO)lParam;
+ mmi->ptMinTrackSize.x = 400; // The minimum width in points
+ mmi->ptMinTrackSize.y = 300; // The minimum height in points
+ }
+ break;
case WM_COMMAND:
switch (LOWORD(wParam)) {
@@ -124,44 +124,44 @@ INT_PTR CALLBACK DlgProcView(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara break;
case WM_CONTEXTMENU:
- {
- HWND hView = GetDlgItem(hwndDlg, IDC_VIEWVERSIONINFO);
- GetWindowRect(hView, &rc);
-
- POINT pt;
- pt.x = LOWORD(lParam);
- pt.y = HIWORD(lParam);
- if (PtInRect(&rc, pt)) {
- static const CHARRANGE all = { 0, -1 };
-
- HMENU hMenu = LoadMenu(hInst, MAKEINTRESOURCE(IDR_CONTEXT));
- HMENU hSubMenu = GetSubMenu(hMenu, 0);
- TranslateMenu(hSubMenu);
-
- CHARRANGE sel;
- SendMessage(hView, EM_EXGETSEL, 0, (LPARAM)&sel);
- if (sel.cpMin == sel.cpMax)
- EnableMenuItem(hSubMenu, IDM_COPY, MF_BYCOMMAND | MF_GRAYED);
-
- switch (TrackPopupMenu(hSubMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hwndDlg, NULL)) {
- case IDM_COPY:
- SendMessage(hView, WM_COPY, 0, 0);
- break;
-
- case IDM_COPYALL:
- SendMessage(hView, EM_EXSETSEL, 0, (LPARAM)&all);
- SendMessage(hView, WM_COPY, 0, 0);
- SendMessage(hView, EM_EXSETSEL, 0, (LPARAM)&sel);
- break;
-
- case IDM_SELECTALL:
- SendMessage(hView, EM_EXSETSEL, 0, (LPARAM)&all);
- break;
- }
- DestroyMenu(hMenu);
+ {
+ HWND hView = GetDlgItem(hwndDlg, IDC_VIEWVERSIONINFO);
+ GetWindowRect(hView, &rc);
+
+ POINT pt;
+ pt.x = LOWORD(lParam);
+ pt.y = HIWORD(lParam);
+ if (PtInRect(&rc, pt)) {
+ static const CHARRANGE all = { 0, -1 };
+
+ HMENU hMenu = LoadMenu(hInst, MAKEINTRESOURCE(IDR_CONTEXT));
+ HMENU hSubMenu = GetSubMenu(hMenu, 0);
+ TranslateMenu(hSubMenu);
+
+ CHARRANGE sel;
+ SendMessage(hView, EM_EXGETSEL, 0, (LPARAM)&sel);
+ if (sel.cpMin == sel.cpMax)
+ EnableMenuItem(hSubMenu, IDM_COPY, MF_BYCOMMAND | MF_GRAYED);
+
+ switch (TrackPopupMenu(hSubMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hwndDlg, NULL)) {
+ case IDM_COPY:
+ SendMessage(hView, WM_COPY, 0, 0);
+ break;
+
+ case IDM_COPYALL:
+ SendMessage(hView, EM_EXSETSEL, 0, (LPARAM)&all);
+ SendMessage(hView, WM_COPY, 0, 0);
+ SendMessage(hView, EM_EXSETSEL, 0, (LPARAM)&sel);
+ break;
+
+ case IDM_SELECTALL:
+ SendMessage(hView, EM_EXSETSEL, 0, (LPARAM)&all);
+ break;
}
+ DestroyMenu(hMenu);
}
- break;
+ }
+ break;
case WM_DESTROY:
hViewWnd = NULL;
diff --git a/plugins/CrashDumper/src/upload.cpp b/plugins/CrashDumper/src/upload.cpp index fccdc858ce..f3a70a2cae 100644 --- a/plugins/CrashDumper/src/upload.cpp +++ b/plugins/CrashDumper/src/upload.cpp @@ -42,7 +42,8 @@ void GetLoginStr(char* user, size_t szuser, char* pass) if (db_get_s(NULL, PluginName, "Username", &dbv) == 0) {
strncpy_s(user, szuser, dbv.pszVal, _TRUNCATE);
db_free(&dbv);
- } else
+ }
+ else
user[0] = 0;
if (db_get_s(NULL, PluginName, "Password", &dbv) == 0) {
@@ -56,7 +57,8 @@ void GetLoginStr(char* user, size_t szuser, char* pass) arrayToHex(hash, sizeof(hash), pass);
db_free(&dbv);
- } else
+ }
+ else
pass[0] = 0;
}
diff --git a/plugins/CrashDumper/src/utils.cpp b/plugins/CrashDumper/src/utils.cpp index 9092f3e543..44dbff6fde 100644 --- a/plugins/CrashDumper/src/utils.cpp +++ b/plugins/CrashDumper/src/utils.cpp @@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. static HINSTANCE hKernel = GetModuleHandleA("kernel32.dll");
-typedef BOOL (WINAPI *tGetProductInfo)(DWORD, DWORD, DWORD, DWORD, PDWORD);
+typedef BOOL(WINAPI *tGetProductInfo)(DWORD, DWORD, DWORD, DWORD, PDWORD);
tGetProductInfo pGetProductInfo = (tGetProductInfo)GetProcAddress(hKernel, "GetProductInfo");
void GetOSDisplayString(CMString &buffer)
diff --git a/plugins/CrashDumper/src/utils.h b/plugins/CrashDumper/src/utils.h index 8eac8158c4..70d49006de 100644 --- a/plugins/CrashDumper/src/utils.h +++ b/plugins/CrashDumper/src/utils.h @@ -127,7 +127,7 @@ bool IsPluginEnabled(TCHAR* filename); PLUGININFOEX* GetMirInfo(HMODULE hModule);
const PLUGININFOEX* GetPluginInfoEx(void);
-void CreateMiniDump (HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr);
+void CreateMiniDump(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr);
void CreateCrashReport(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr, const TCHAR* msg);
void PrintVersionInfo(CMString& buffer, unsigned flags = VI_FLAG_PRNVAR);
bool ProcessVIHash(bool store);
@@ -141,8 +141,8 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP INT_PTR CALLBACK DlgProcView(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
void DestroyAllWindows(void);
-void UploadInit(void);
-void UploadClose(void);
+void UploadInit(void);
+void UploadClose(void);
void OpenAuthUrl(const char* url);
void __cdecl VersionInfoUploadThread(void* arg);
|