onepad|common: fix GCC warning type limit

This commit is contained in:
Gregory Hainaut 2016-08-12 19:17:35 +02:00
parent 88b7470c07
commit 5ad4cbace7
3 changed files with 5 additions and 1 deletions

View File

@ -127,8 +127,10 @@ __emitinline void xJccKnownTarget( JccComparisonType comparison, const void* tar
s32* bah = xJcc32( comparison );
sptr distance = (sptr)target - (sptr)xGetPtr();
#ifdef __x86_64__
// This assert won't physically happen on x86 targets
pxAssertDev(distance >= -0x80000000LL && distance < 0x80000000LL, "Jump target is too far away, needs an indirect register");
#endif
*bah = (s32)distance;
}

View File

@ -251,7 +251,9 @@ void EmitSibMagic( uint regfield, const void* address )
// We must make sure that the displacement is within the 32bit range
// Else we will fail out in a spectacular fashion
sptr displacement = (sptr)address;
#ifdef __x86_64__
pxAssertDev(displacement >= -0x80000000LL && displacement < 0x80000000LL, "SIB target is too far away, needs an indirect register");
#endif
xWrite<s32>( (s32)displacement );
}

View File

@ -115,7 +115,7 @@ class PADconf
**/
void set_ff_intensity(u32 new_intensity)
{
if(new_intensity <= 0x7FFF && new_intensity >= 0)
if(new_intensity <= 0x7FFF)
{
ff_intensity = new_intensity;
}