More warning fixes, switches and printfs, etc.

This time ones not reported by Visual Studio.
This commit is contained in:
Unknown W. Brackets committed 2013-01-19 18:32:37 -08:00
1 parent 4d8700cbfa
commit 862c88d61a
7 files changed
+17 -9

No files matched your search

+1
View File
@@ -120,6 +120,7 @@ reswitch:
case CORE_POWERDOWN:
case CORE_ERROR:
case CORE_NEXTFRAME:
//1: Exit loop!!
return;
}
+1 -1
View File
@@ -457,7 +457,7 @@ void SymbolMap::UseFuncSignaturesFile(const char *filename, u32 maxAddress)
for (size_t j=0; j<numSigs; j++)
fprintf(f, "%08x\t%08x\t%08x\t%s\n", sigs[j].inst, sigs[j].size, sigs[j].hash, sigs[j].name);
fseek(f,0,SEEK_SET);
fprintf(f,"%08x",numSigs);
fprintf(f,"%08x", (unsigned int)numSigs);
fclose(f);
u32 last = 0xc0d3babe;
+5 -2
View File
@@ -386,13 +386,14 @@ u32 sceIoWriteAsync(int id, void *data_ptr, int size)
u32 sceIoGetDevType(int id)
{
ERROR_LOG(HLE, "UNIMPL sceIoGetDevType(%d)", id);
u32 error;
FileNode *f = kernelObjects.Get < FileNode > (id, error);
int result;
if (f)
result = PSP_DEV_TYPE_ALIAS;
else {
ERROR_LOG(HLE, "sceIoGetDevTyp: unknown id %s", id);
ERROR_LOG(HLE, "sceIoGetDevType: unknown id %d", id);
result = ERROR_KERNEL_BAD_FILE_DESCRIPTOR;
}
@@ -401,13 +402,14 @@ u32 sceIoGetDevType(int id)
u32 sceIoCancel(int id)
{
ERROR_LOG(HLE, "UNIMPL sceIoCancel(%d)", id);
u32 error;
FileNode *f = kernelObjects.Get < FileNode > (id, error);
int result;
if (f)
f->closePending = true;
else {
ERROR_LOG(HLE, "sceIoCancel: unknown id %s", id);
ERROR_LOG(HLE, "sceIoCancel: unknown id %d", id);
result = ERROR_KERNEL_BAD_FILE_DESCRIPTOR;
}
@@ -795,6 +797,7 @@ int sceIoCloseAsync(int id)
u32 sceIoLseekAsync(int id, s64 offset, int whence)
{
DEBUG_LOG(HLE, "sceIoLseekAsync(%d) sorta implemented", id);
sceIoLseek(id, offset, whence);
__IoCompleteAsyncIO(id);
return 0;
+1 -1
View File
@@ -903,7 +903,7 @@ u32 sceKernelLoadModuleByID(u32 id, u32 flags, u32 lmoptionPtr)
{
u32 error;
u32 handle = __IoGetFileHandleFromId(id, error);
if (handle < 0) {
if (handle == -1) {
ERROR_LOG(HLE,"sceKernelLoadModuleByID(%08x, %08x, %08x): could not open file id",id,flags,lmoptionPtr);
return error;
}
+3 -3
View File
@@ -1874,7 +1874,7 @@ void sceKernelSleepThreadCB()
int sceKernelWaitThreadEnd(SceUID threadID, u32 timeoutPtr)
{
DEBUG_LOG(HLE, "sceKernelWaitThreadEnd(%i, %08x)", threadID);
DEBUG_LOG(HLE, "sceKernelWaitThreadEnd(%i, %08x)", threadID, timeoutPtr);
if (threadID == 0 || threadID == currentThread)
return SCE_KERNEL_ERROR_ILLEGAL_THID;
@@ -1900,7 +1900,7 @@ int sceKernelWaitThreadEnd(SceUID threadID, u32 timeoutPtr)
int sceKernelWaitThreadEndCB(SceUID threadID, u32 timeoutPtr)
{
DEBUG_LOG(HLE, "sceKernelWaitThreadEnd(%i)", threadID);
DEBUG_LOG(HLE, "sceKernelWaitThreadEndCB(%i)", threadID, timeoutPtr);
if (threadID == 0 || threadID == currentThread)
return SCE_KERNEL_ERROR_ILLEGAL_THID;
@@ -1920,7 +1920,7 @@ int sceKernelWaitThreadEndCB(SceUID threadID, u32 timeoutPtr)
}
else
{
ERROR_LOG(HLE, "sceKernelWaitThreadEnd - bad thread %i", threadID);
ERROR_LOG(HLE, "sceKernelWaitThreadEndCB - bad thread %i", threadID);
return error;
}
}
+2 -2
View File
@@ -193,7 +193,7 @@ struct MpegContext {
bool endOfVideoReached;
int videoPixelMode;
u32 mpegMagic;
u32 mpegVersion;
int mpegVersion;
u32 mpegRawVersion;
u32 mpegOffset;
u32 mpegStreamSize;
@@ -1028,7 +1028,7 @@ int sceMpegGetAvcAu(u32 mpeg, u32 streamId, u32 auAddr, u32 attrAddr)
}
result = PSP_ERROR_MPEG_NO_DATA;
}
if (ctx->mpegLastTimestamp < 0 || sceAu.pts >= ctx->mpegLastTimestamp) {
if (ctx->mpegLastTimestamp <= 0 || sceAu.pts >= ctx->mpegLastTimestamp) {
NOTICE_LOG(HLE, "End of video reached");
ctx->endOfVideoReached = true;
} else {
+4
View File
@@ -656,6 +656,10 @@ namespace MIPSInt
d[2] = ExpandHalf(s[1] & 0xFFFF);
d[3] = ExpandHalf(s[1] >> 16);
break;
case V_Triple:
case V_Quad:
_dbg_assert_msg_(CPU, 0, "Trying to interpret Int_Vh2f instruction that can't be interpreted");
break;
}
ApplyPrefixD(d, sz); //TODO: and the mask to kill everything but mask
WriteVector(d, sz, vd);