mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Warning fixes
This commit is contained in:
parent
b96859828f
commit
ddfbd18370
@ -139,15 +139,12 @@ bool TryParse(const std::string &str, u32 *const output)
|
||||
|
||||
if (ULONG_MAX > UINT_MAX) {
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning disable(4309);
|
||||
#pragma warning (disable:4309)
|
||||
#endif
|
||||
// Note: The typecasts avoid GCC warnings when long is 32 bits wide.
|
||||
if (value >= static_cast<unsigned long>(0x100000000ull)
|
||||
&& value <= static_cast<unsigned long>(0xFFFFFFFF00000000ull))
|
||||
return false;
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning enable(4309);
|
||||
#endif
|
||||
}
|
||||
|
||||
*output = static_cast<u32>(value);
|
||||
|
@ -544,7 +544,7 @@ void __KernelScheduleWakeup(SceUID threadID, int usFromNow)
|
||||
|
||||
void __KernelRemoveFromThreadQueue(Thread *t)
|
||||
{
|
||||
for (int i = 0; i < threadqueue.size(); i++)
|
||||
for (size_t i = 0; i < threadqueue.size(); i++)
|
||||
{
|
||||
if (threadqueue[i] == t)
|
||||
{
|
||||
@ -628,7 +628,7 @@ void sceKernelCheckThreadStack()
|
||||
{
|
||||
u32 error;
|
||||
Thread *t = kernelObjects.Get<Thread>(__KernelGetCurThread(), error);
|
||||
u32 diff = abs((s64)t->stackBlock - (s64)currentMIPS->r[MIPS_REG_SP]);
|
||||
u32 diff = (u32)abs((s64)t->stackBlock - (s64)currentMIPS->r[MIPS_REG_SP]);
|
||||
ERROR_LOG(HLE, "%i=sceKernelCheckThreadStack()", diff);
|
||||
RETURN(diff); //Blatant lie
|
||||
}
|
||||
|
@ -826,7 +826,7 @@ namespace MIPSInt
|
||||
{
|
||||
switch ((op >> 16) & 0x1f)
|
||||
{
|
||||
case 1: d[i] = currentMIPS->rng.R32(); break; // vrndi - TODO: copy bits instead?
|
||||
case 1: d[i] = (float)currentMIPS->rng.R32(); break; // vrndi - TODO: copy bits instead?
|
||||
case 2: d[i] = 1.0f + ((float)currentMIPS->rng.R32() / 0xFFFFFFFF); break; // vrndf1 TODO: make more accurate
|
||||
case 3: d[i] = 2.0f + 2 * ((float)currentMIPS->rng.R32() / 0xFFFFFFFF); break; // vrndf2 TODO: make more accurate
|
||||
case 4: d[i] = 0.0f; // Should not get here
|
||||
|
Loading…
Reference in New Issue
Block a user