More warning fixing

This commit is contained in:
Henrik Rydgard committed 2012-11-18 23:35:02 +01:00
1 parent e2c3f26f1b
commit d572d40c36
12 files changed
+41 -37

No files matched your search

+2 -2
View File
@@ -10,7 +10,7 @@ class FixedSizeUnorderedSet
public:
bool insert(T item)
{
if (count_ < maxCount - 1)
if (count_ < (int)maxCount - 1)
{
data_[count_++] = item;
return true;
@@ -41,7 +41,7 @@ public:
size_t size()
{
return count_;
return (size_t)count_;
}
T &operator[](size_t index) {
+2 -2
View File
@@ -149,14 +149,14 @@ u32 sceAudioOutputPanned(u32 chan, u32 leftVol, u32 rightVol, u32 samplePtr)
int sceAudioGetChannelRestLen(u32 chan)
{
int sz = (int)chans[chan].sampleQueue.size() / 2;
DEBUG_LOG(HLE,"UNTESTED %i = sceAudioGetChannelRestLen(%i)", PARAM(0));
DEBUG_LOG(HLE,"UNTESTED %i = sceAudioGetChannelRestLen(%i)", sz, chan);
return sz;
}
int sceAudioGetChannelRestLength(u32 chan)
{
int sz = (int)chans[chan].sampleQueue.size() / 2;
DEBUG_LOG(HLE,"UNTESTED %i = sceAudioGetChannelRestLen(%i)", PARAM(0));
DEBUG_LOG(HLE,"UNTESTED %i = sceAudioGetChannelRestLen(%i)", sz, chan);
return sz;
}
+6 -4
View File
@@ -199,10 +199,12 @@ public:
{
return subIntrHandlers.find(subIntrNum) != subIntrHandlers.end();
}
SubIntrHandler &get(int subIntrNum)
SubIntrHandler *get(int subIntrNum)
{
if (has(subIntrNum))
return subIntrHandlers[subIntrNum];
return &subIntrHandlers[subIntrNum];
else
return 0;
// what to do, what to do...
}
@@ -365,7 +367,7 @@ u32 sceKernelEnableSubIntr(u32 intrNumber, u32 subIntrNumber)
if (!intrHandlers[intrNumber].has(subIntrNumber))
return -1;
intrHandlers[intrNumber].get(subIntrNumber).enabled = true;
intrHandlers[intrNumber].get(subIntrNumber)->enabled = true;
return 0;
}
@@ -378,7 +380,7 @@ u32 sceKernelDisableSubIntr(u32 intrNumber, u32 subIntrNumber)
if (!intrHandlers[intrNumber].has(subIntrNumber))
return -1;
intrHandlers[intrNumber].get(subIntrNumber).enabled = false;
intrHandlers[intrNumber].get(subIntrNumber)->enabled = false;
return 0;
}
+2 -2
View File
@@ -1170,7 +1170,7 @@ void sceKernelWakeupThread()
}
}
else {
ERROR_LOG(HLE,"sceKernelWakeupThread(%i) - bad thread id");
ERROR_LOG(HLE,"sceKernelWakeupThread(%i) - bad thread id", uid);
RETURN(error);
}
}
@@ -1189,7 +1189,7 @@ void sceKernelCancelWakeupThread()
RETURN(wCount);
}
else {
ERROR_LOG(HLE,"sceKernelCancelWakeupThread(%i) - bad thread id");
ERROR_LOG(HLE,"sceKernelCancelWakeupThread(%i) - bad thread id", uid);
RETURN(error);
}
}
+2 -2
View File
@@ -140,12 +140,12 @@ int sceKernelPowerLock(int lockType)
}
int sceKernelPowerUnlock(int lockType)
{
DEBUG_LOG(HLE,"UNIMPL 0=sceKernelPowerUnlock(%i)");
DEBUG_LOG(HLE,"UNIMPL 0=sceKernelPowerUnlock(%i)", lockType);
return 0;
}
int sceKernelPowerTick(int flag)
{
DEBUG_LOG(HLE,"UNIMPL 0=sceKernelPowerTick()");
DEBUG_LOG(HLE,"UNIMPL 0=sceKernelPowerTick(%i)", flag);
return 0;
}
+1 -1
View File
@@ -365,7 +365,7 @@ void JitBlockCache::DestroyBlock(int block_num, bool invalidate)
#ifdef JIT_UNLIMITED_ICACHE
Memory::Write_Opcode_JIT(b.originalAddress, b.originalFirstOpcode?b.originalFirstOpcode:JIT_ICACHE_INVALID_WORD);
#else
if (Memory::ReadUnchecked_U32(b.originalAddress) == block_num)
if ((int)Memory::ReadUnchecked_U32(b.originalAddress) == block_num)
Memory::WriteUnchecked_U32(b.originalFirstOpcode, b.originalAddress);
#endif
+3 -2
View File
@@ -282,7 +282,7 @@ void GPRRegCache::BindToRegister(int i, bool doLoad, bool makeDirty)
{
if (i != j && regs[j].location.IsSimpleReg() && regs[j].location.GetSimpleReg() == xr)
{
PanicAlert("");
PanicAlert("bad");
}
}
regs[i].away = true;
@@ -318,7 +318,8 @@ void GPRRegCache::StoreFromRegister(int i)
doStore = true;
}
Location newLoc = GetDefaultLocation(i);
//if (doStore)
if (doStore)
;
// emit->MOV(32, newLoc, regs[i].location);
regs[i].location = newLoc;
regs[i].away = false;
+1
View File
@@ -431,6 +431,7 @@ namespace MIPSDis
break;
default:
// invalid
name = "???";
break;
}
int vd = _VD;
+6 -5
View File
@@ -311,7 +311,7 @@ namespace MIPSInt
switch (op >> 26)
{
case 48: // ll
R(rt) = Memory::Read_U32(addr);
R(rt) = Memory::Read_U32(addr);
currentMIPS->llBit = 1;
break;
case 56: // sc
@@ -580,7 +580,7 @@ namespace MIPSInt
{
s32 a = (s32)R(rs);
s32 b = (s32)R(rt);
if (a == 0x80000000 && b == -1) {
if (a == (s32)0x80000000 && b == -1) {
LO = 0x80000000;
} else if (b != 0) {
LO = (u32)(a / b);
@@ -768,10 +768,10 @@ namespace MIPSInt
case 36:
switch (currentMIPS->fcr31 & 3)
{
case 0: FsI(fd) = roundf(F(fs)); break; // RINT_0 // TODO: rintf or roundf?
case 0: FsI(fd) = (int)roundf(F(fs)); break; // RINT_0 // TODO: rintf or roundf?
case 1: FsI(fd) = (int)F(fs); break; // CAST_1
case 2: FsI(fd) = ceilf(F(fs)); break; // CEIL_2
case 3: FsI(fd) = floorf(F(fs)); break; // FLOOR_3
case 2: FsI(fd) = (int)ceilf(F(fs)); break; // CEIL_2
case 3: FsI(fd) = (int)floorf(F(fs)); break; // FLOOR_3
}
break; //cvt.w.s
default:
@@ -815,6 +815,7 @@ namespace MIPSInt
default:
_dbg_assert_msg_(CPU,0,"Trying to interpret FPUComp instruction that can't be interpreted");
cond = false;
break;
}
currentMIPS->fpcond = cond;
+4 -2
View File
@@ -1206,6 +1206,7 @@ namespace MIPSInt
for (int i = 0; i < n; i++)
{
int c;
// These set c to 0 or 1, nothing else.
switch (cond)
{
case VC_EQ: c = s[i] == t[i]; break;
@@ -1230,8 +1231,9 @@ namespace MIPSInt
affected_bits |= 1 << i;
}
// Use masking to only change the affected bits
currentMIPS->vfpuCtrl[VFPU_CTRL_CC] = (currentMIPS->vfpuCtrl[VFPU_CTRL_CC] & ~affected_bits) |
(cc | (or_val << 4) | (and_val << 5)) & affected_bits;
currentMIPS->vfpuCtrl[VFPU_CTRL_CC] =
(currentMIPS->vfpuCtrl[VFPU_CTRL_CC] & ~affected_bits) |
((cc | (or_val << 4) | (and_val << 5)) & affected_bits);
PC += 4;
EatPrefixes();
}
+10 -13
View File
@@ -497,8 +497,8 @@ void PSPSetTexture()
if (!texaddr) return;
u8 level = 0;
int format = gstate.texformat & 0xF;
int clutformat = gstate.clutformat & 3;
u32 format = gstate.texformat & 0xF;
u32 clutformat = gstate.clutformat & 3;
DEBUG_LOG(G3D,"Texture at %08x",texaddr);
u8 *texptr = Memory::GetPointer(texaddr);
@@ -513,26 +513,23 @@ void PSPSetTexture()
bool match = true;
//TODO: Check more texture parameters, compute real texture hash
if(dim != entry.dim || entry.hash != *(u32*)texptr || entry.format != format)
if (dim != entry.dim || entry.hash != *(u32*)texptr || entry.format != format)
match = false;
//TODO: Check more clut parameters, compute clut hash
if(match && (format >= GE_TFMT_CLUT4 && format <= GE_TFMT_CLUT32) &&
(entry.clutformat != clutformat ||
entry.clutaddr != GetClutAddr(clutformat == GE_CMODE_32BIT_ABGR8888 ? 4 : 2) ||
entry.cluthash != Memory::Read_U32(entry.clutaddr)))
if (match && (format >= GE_TFMT_CLUT4 && format <= GE_TFMT_CLUT32) &&
(entry.clutformat != clutformat ||
entry.clutaddr != GetClutAddr(clutformat == GE_CMODE_32BIT_ABGR8888 ? 4 : 2) ||
entry.cluthash != Memory::Read_U32(entry.clutaddr)))
match = false;
if (match)
{
if (match) {
//got one!
glBindTexture(GL_TEXTURE_2D, entry.texture);
UpdateSamplingParams();
DEBUG_LOG(G3D,"Texture at %08x Found in Cache, applying", texaddr);
return; //Done!
}
else
{
} else {
NOTICE_LOG(G3D,"Texture different or overwritten, reloading at %08x", texaddr);
//Damnit, got overwritten.
@@ -785,7 +782,7 @@ void PSPSetTexture()
} else {
write = (u8 *)finalBuf;
}
for (int y = 0; y < h; y++) {
for (u32 y = 0; y < h; y++) {
memmove(write, read, outRowBytes);
read += inRowBytes;
write += outRowBytes;
+2 -2
View File
@@ -24,8 +24,8 @@ LOCAL_MODULE := ppsspp_jni
NATIVE := ../../native
SRC := ../..
LOCAL_CFLAGS := -DUSE_PROFILER -DGL_GLEXT_PROTOTYPES -O2 -fsigned-char -Wall -Wno-multichar -Wno-psabi -std=gnu++0x -Wno-unused-variable -fno-strict-aliasing -ffast-math
LOCAL_CPPFLAGS :=
LOCAL_CFLAGS := -DUSE_PROFILER -DGL_GLEXT_PROTOTYPES -O2 -fsigned-char -Wall -Wno-multichar -Wno-psabi -Wno-unused-variable -fno-strict-aliasing -ffast-math
LOCAL_CPPFLAGS := -std=gnu++0x
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../../Common \
$(LOCAL_PATH)/../.. \