Fix signed - unsigned comparison warning

This commit is contained in:
Peace-Maker 2018-04-21 13:41:50 +02:00
parent 3e2471f93a
commit 2df53be4a5
7 changed files with 20 additions and 20 deletions

View File

@ -200,11 +200,11 @@ public:
@param <pRegisters>:
A snapshot of all saved registers.
*/
virtual void* GetArgumentPtr(int iIndex, CRegisters* pRegisters) = 0;
virtual void* GetArgumentPtr(unsigned int iIndex, CRegisters* pRegisters) = 0;
/*
*/
virtual void ArgumentPtrChanged(int iIndex, CRegisters* pRegisters, void* pArgumentPtr) = 0;
virtual void ArgumentPtrChanged(unsigned int iIndex, CRegisters* pRegisters, void* pArgumentPtr) = 0;
/*
Returns a pointer to the return value.

View File

@ -127,7 +127,7 @@ int x86MsCdecl::GetArgRegisterSize()
return iArgRegisterSize;
}
void* x86MsCdecl::GetArgumentPtr(int iIndex, CRegisters* pRegisters)
void* x86MsCdecl::GetArgumentPtr(unsigned int iIndex, CRegisters* pRegisters)
{
if (iIndex < 0 || iIndex >= m_vecArgTypes.length())
return NULL;
@ -142,8 +142,8 @@ void* x86MsCdecl::GetArgumentPtr(int iIndex, CRegisters* pRegisters)
return pRegister->m_pAddress;
}
int iOffset = 4;
for(int i=0; i < iIndex; i++)
size_t iOffset = 4;
for(unsigned int i=0; i < iIndex; i++)
{
if (m_vecArgTypes[i].custom_register == None)
iOffset += m_vecArgTypes[i].size;
@ -152,7 +152,7 @@ void* x86MsCdecl::GetArgumentPtr(int iIndex, CRegisters* pRegisters)
return (void *) (pRegisters->m_esp->GetValue<unsigned long>() + iOffset);
}
void x86MsCdecl::ArgumentPtrChanged(int iIndex, CRegisters* pRegisters, void* pArgumentPtr)
void x86MsCdecl::ArgumentPtrChanged(unsigned int iIndex, CRegisters* pRegisters, void* pArgumentPtr)
{
}

View File

@ -72,8 +72,8 @@ public:
virtual void** GetStackArgumentPtr(CRegisters* pRegisters);
virtual int GetArgRegisterSize();
virtual void* GetArgumentPtr(int iIndex, CRegisters* pRegisters);
virtual void ArgumentPtrChanged(int iIndex, CRegisters* pRegisters, void* pArgumentPtr);
virtual void* GetArgumentPtr(unsigned int iIndex, CRegisters* pRegisters);
virtual void ArgumentPtrChanged(unsigned int iIndex, CRegisters* pRegisters, void* pArgumentPtr);
virtual void* GetReturnPtr(CRegisters* pRegisters);
virtual void ReturnPtrChanged(CRegisters* pRegisters, void* pReturnPtr);

View File

@ -135,7 +135,7 @@ int x86MsStdcall::GetArgRegisterSize()
return iArgRegisterSize;
}
void* x86MsStdcall::GetArgumentPtr(int iIndex, CRegisters* pRegisters)
void* x86MsStdcall::GetArgumentPtr(unsigned int iIndex, CRegisters* pRegisters)
{
if (iIndex < 0 || iIndex >= m_vecArgTypes.length())
return NULL;
@ -150,8 +150,8 @@ void* x86MsStdcall::GetArgumentPtr(int iIndex, CRegisters* pRegisters)
return pRegister->m_pAddress;
}
int iOffset = 4;
for (int i = 0; i < iIndex; i++)
size_t iOffset = 4;
for (unsigned int i = 0; i < iIndex; i++)
{
if (m_vecArgTypes[i].custom_register == None)
iOffset += m_vecArgTypes[i].size;
@ -160,7 +160,7 @@ void* x86MsStdcall::GetArgumentPtr(int iIndex, CRegisters* pRegisters)
return (void *)(pRegisters->m_esp->GetValue<unsigned long>() + iOffset);
}
void x86MsStdcall::ArgumentPtrChanged(int iIndex, CRegisters* pRegisters, void* pArgumentPtr)
void x86MsStdcall::ArgumentPtrChanged(unsigned int iIndex, CRegisters* pRegisters, void* pArgumentPtr)
{
}

View File

@ -72,8 +72,8 @@ public:
virtual void** GetStackArgumentPtr(CRegisters* pRegisters);
virtual int GetArgRegisterSize();
virtual void* GetArgumentPtr(int iIndex, CRegisters* pRegisters);
virtual void ArgumentPtrChanged(int iIndex, CRegisters* pRegisters, void* pArgumentPtr);
virtual void* GetArgumentPtr(unsigned int iIndex, CRegisters* pRegisters);
virtual void ArgumentPtrChanged(unsigned int iIndex, CRegisters* pRegisters, void* pArgumentPtr);
virtual void* GetReturnPtr(CRegisters* pRegisters);
virtual void ReturnPtrChanged(CRegisters* pRegisters, void* pReturnPtr);

View File

@ -143,7 +143,7 @@ int x86MsThiscall::GetArgRegisterSize()
return iArgRegisterSize;
}
void* x86MsThiscall::GetArgumentPtr(int iIndex, CRegisters* pRegisters)
void* x86MsThiscall::GetArgumentPtr(unsigned int iIndex, CRegisters* pRegisters)
{
if (iIndex == 0)
{
@ -167,8 +167,8 @@ void* x86MsThiscall::GetArgumentPtr(int iIndex, CRegisters* pRegisters)
return pRegister->m_pAddress;
}
int iOffset = 4;
for(int i=0; i < iIndex; i++)
size_t iOffset = 4;
for(unsigned int i=0; i < iIndex; i++)
{
if (m_vecArgTypes[i].custom_register == None)
iOffset += m_vecArgTypes[i].size;
@ -177,7 +177,7 @@ void* x86MsThiscall::GetArgumentPtr(int iIndex, CRegisters* pRegisters)
return (void *) (pRegisters->m_esp->GetValue<unsigned long>() + iOffset);
}
void x86MsThiscall::ArgumentPtrChanged(int iIndex, CRegisters* pRegisters, void* pArgumentPtr)
void x86MsThiscall::ArgumentPtrChanged(unsigned int iIndex, CRegisters* pRegisters, void* pArgumentPtr)
{
}

View File

@ -73,8 +73,8 @@ public:
virtual void** GetStackArgumentPtr(CRegisters* pRegisters);
virtual int GetArgRegisterSize();
virtual void* GetArgumentPtr(int iIndex, CRegisters* pRegisters);
virtual void ArgumentPtrChanged(int iIndex, CRegisters* pRegisters, void* pArgumentPtr);
virtual void* GetArgumentPtr(unsigned int iIndex, CRegisters* pRegisters);
virtual void ArgumentPtrChanged(unsigned int iIndex, CRegisters* pRegisters, void* pArgumentPtr);
virtual void* GetReturnPtr(CRegisters* pRegisters);
virtual void ReturnPtrChanged(CRegisters* pRegisters, void* pReturnPtr);