From 978361df330a09b65f67c3acf729f95e43d57757 Mon Sep 17 00:00:00 2001 From: "Mr. eXoDia" Date: Tue, 8 Jul 2014 02:55:56 +0200 Subject: [PATCH] fixed warnings --- TitanEngine/Global.Breakpoints.cpp | 6 ++--- TitanEngine/Global.Engine.Importer.cpp | 2 +- TitanEngine/Global.Engine.cpp | 2 +- TitanEngine/Global.Helper.cpp | 2 +- TitanEngine/Global.OEPFinder.cpp | 2 +- TitanEngine/TitanEngine.Breakpoints.cpp | 16 +++++++------- TitanEngine/TitanEngine.Debugger.Control.cpp | 6 ++--- .../TitanEngine.Debugger.DebugLoop.cpp | 10 ++++----- TitanEngine/TitanEngine.Debugger.cpp | 4 ++-- TitanEngine/TitanEngine.Disassembler.cpp | 20 +++++------------ TitanEngine/TitanEngine.Hooks.cpp | 2 +- TitanEngine/TitanEngine.Librarian.cpp | 2 +- TitanEngine/TitanEngine.Threader.cpp | 22 +++++++++---------- 13 files changed, 43 insertions(+), 53 deletions(-) diff --git a/TitanEngine/Global.Breakpoints.cpp b/TitanEngine/Global.Breakpoints.cpp index 738e05d..b81993d 100644 --- a/TitanEngine/Global.Breakpoints.cpp +++ b/TitanEngine/Global.Breakpoints.cpp @@ -116,7 +116,7 @@ void BreakPointPostReadFilter(ULONG_PTR lpBaseAddress, unsigned char* lpBuffer, CriticalSectionLocker lock(LockBreakPointBuffer); ULONG_PTR start=lpBaseAddress; ULONG_PTR end=start+nSize; - int bpcount=BreakPointBuffer.size(); + int bpcount=(int)BreakPointBuffer.size(); for(int i=0; i 0 && szDependencyForFile[i] != L'\\') { i--; diff --git a/TitanEngine/Global.Helper.cpp b/TitanEngine/Global.Helper.cpp index 58ffe06..f0570fa 100644 --- a/TitanEngine/Global.Helper.cpp +++ b/TitanEngine/Global.Helper.cpp @@ -5,7 +5,7 @@ bool IsStrEqual( const char* const a, const char* const b, bool considercase/*=true*/ ) { - const int stringlen = std::strlen(a); + const int stringlen = (int)std::strlen(a); if(stringlen != std::strlen(b)) return false; //cheap diff --git a/TitanEngine/Global.OEPFinder.cpp b/TitanEngine/Global.OEPFinder.cpp index e11a7b9..0d790e1 100644 --- a/TitanEngine/Global.OEPFinder.cpp +++ b/TitanEngine/Global.OEPFinder.cpp @@ -17,7 +17,7 @@ void GenericOEPVirtualProtectHit() DWORD NewProtect = 0; DWORD OldProtect = 0; - int bpcount=BreakPointBuffer.size(); + int bpcount=(int)BreakPointBuffer.size(); for(int i=0; i-1; i--) diff --git a/TitanEngine/TitanEngine.Debugger.Control.cpp b/TitanEngine/TitanEngine.Debugger.Control.cpp index 3f24c6e..10b3845 100644 --- a/TitanEngine/TitanEngine.Debugger.Control.cpp +++ b/TitanEngine/TitanEngine.Debugger.Control.cpp @@ -8,7 +8,7 @@ __declspec(dllexport) void TITCALL ForceClose() { //manage process list - int processcount=hListProcess.size(); + int processcount=(int)hListProcess.size(); for(int i=0; i= 0; i--) + for(int i = (int)LibrarianData.size() - 1; i >= 0; i--) { ptrLibrarianData=&LibrarianData.at(i); if(!_stricmp(ptrLibrarianData->szLibraryName, szAnsiLibraryName)) @@ -415,7 +415,7 @@ __declspec(dllexport) void TITCALL DebugLoop() RtlZeroMemory(szAnsiLibraryName, sizeof(szAnsiLibraryName)); WideCharToMultiByte(CP_ACP, NULL, hLoadedLibData->szLibraryName, -1, szAnsiLibraryName, sizeof szAnsiLibraryName, NULL, NULL); - for(int i= LibrarianData.size() - 1; i >= 0; i--) + for(int i= (int)LibrarianData.size() - 1; i >= 0; i--) { ptrLibrarianData = &LibrarianData.at(i); if(!_stricmp(ptrLibrarianData->szLibraryName, szAnsiLibraryName)) @@ -520,7 +520,7 @@ __declspec(dllexport) void TITCALL DebugLoop() { bool bFoundBreakPoint=false; BreakPointDetail FoundBreakPoint; - int bpcount=BreakPointBuffer.size(); + int bpcount=(int)BreakPointBuffer.size(); for(int i=0; idwProcessId); + swprintf(szName, 256, L"Global\\szLibraryName%X", (unsigned int)ReturnValue->dwProcessId); DebugDLLFileMapping=CreateFileMappingW(INVALID_HANDLE_VALUE, 0, PAGE_READWRITE, 0, 512*sizeof(wchar_t), szName); if(DebugDLLFileMapping) { @@ -294,7 +294,7 @@ __declspec(dllexport) bool TITCALL DetachDebugger(DWORD ProcessId) __declspec(dllexport) bool TITCALL DetachDebuggerEx(DWORD ProcessId) { ThreaderPauseProcess(); - int threadcount=hListThread.size(); + int threadcount=(int)hListThread.size(); for(int i=0; i= 0; i--) + for(int i = (int)LibrarianData.size() - 1; i >= 0; i--) { if(!_stricmp(szLibraryName, LibrarianData.at(i).szLibraryName) && (LibrarianData.at(i).bpxType == bpxType || bpxType == UE_ON_LIB_ALL)) { diff --git a/TitanEngine/TitanEngine.Threader.cpp b/TitanEngine/TitanEngine.Threader.cpp index 61dc9ab..29c72e5 100644 --- a/TitanEngine/TitanEngine.Threader.cpp +++ b/TitanEngine/TitanEngine.Threader.cpp @@ -8,9 +8,9 @@ void updateThreadList( THREAD_ITEM_DATA* NewThreadData ) { bool notInList = true; - unsigned int count = hListThread.size(); + int count = (int)hListThread.size(); - for (unsigned int i = 0; i < count; i++) + for (int i = 0; i < count; i++) { if (hListThread.at(i).dwThreadId == NewThreadData->dwThreadId) { @@ -159,7 +159,7 @@ __declspec(dllexport) void* TITCALL ThreaderGetThreadInfo(HANDLE hThread, DWORD return NULL; static THREAD_ITEM_DATA ThreadData; memset(&ThreadData, 0, sizeof(THREAD_ITEM_DATA)); - int threadcount=hListThread.size(); + int threadcount=(int)hListThread.size(); for(int i=0; i