mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-21 07:22:02 -04:00
Core: Warning fixes
C4100: 'x' : unreferenced formal parameter C4310: cast truncates constant value C4389: '==' : signed/unsigned mismatch C4668: 'x' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' C4701: potentially uninitialized local variable 'x' used C4826: Conversion from 'HMODULE' to 'DWORD64' is sign-extended. This may cause unexpected runtime behavior. C6067: Parameter '3' in call to 'sprintf' must be the address of the string C6387: 'argument 1' might be '0': this does not adhere to the specification for the function 'CloseHandle'
This commit is contained in:
@@ -409,11 +409,12 @@ void WheatyExceptionReport::printTracesForAllThreads()
|
||||
CONTEXT context;
|
||||
context.ContextFlags = 0xffffffff;
|
||||
HANDLE threadHandle = OpenThread(THREAD_GET_CONTEXT | THREAD_QUERY_INFORMATION, false, te32.th32ThreadID);
|
||||
if (threadHandle && GetThreadContext(threadHandle, &context))
|
||||
if (threadHandle)
|
||||
{
|
||||
WriteStackDetails(&context, false, threadHandle);
|
||||
if (GetThreadContext(threadHandle, &context))
|
||||
WriteStackDetails(&context, false, threadHandle);
|
||||
CloseHandle(threadHandle);
|
||||
}
|
||||
CloseHandle(threadHandle);
|
||||
}
|
||||
} while (Thread32Next(hThreadSnap, &te32));
|
||||
|
||||
@@ -521,7 +522,7 @@ PEXCEPTION_POINTERS pExceptionInfo)
|
||||
_tprintf(_T("Global Variables\r\n"));
|
||||
|
||||
SymEnumSymbols(GetCurrentProcess(),
|
||||
(DWORD64)GetModuleHandle(szFaultingModule),
|
||||
(DWORD64)(DWORD)GetModuleHandle(szFaultingModule),
|
||||
0, EnumerateSymbolsCallback, 0);
|
||||
// #endif // X86 Only!
|
||||
|
||||
@@ -989,7 +990,7 @@ PVOID pAddress)
|
||||
if (!IsBadStringPtr(*(PSTR*)pAddress, 32))
|
||||
{
|
||||
pszCurrBuffer += sprintf(pszCurrBuffer, " = \"%.31s\"",
|
||||
*(PDWORD)pAddress);
|
||||
*(PSTR*)pAddress);
|
||||
}
|
||||
else
|
||||
pszCurrBuffer += sprintf(pszCurrBuffer, " = %X",
|
||||
|
||||
Reference in New Issue
Block a user