From c33eafd430c60540d82366ff367a6940b95740de Mon Sep 17 00:00:00 2001 From: Florent Castelli Date: Fri, 21 Dec 2012 23:02:35 +0100 Subject: [PATCH] Warning fixes --- Core/Dialog/PSPSaveDialog.cpp | 4 ++-- Core/HLE/__sceAudio.cpp | 2 +- Core/HLE/sceAudio.cpp | 2 +- Core/HLE/sceKernelInterrupt.cpp | 5 +++-- Core/HLE/sceKernelThread.cpp | 2 +- Core/HLE/sceRtc.cpp | 14 +++++++------- GPU/GLES/DisplayListInterpreter.cpp | 6 +++--- GPU/GLES/VertexShaderGenerator.cpp | 2 +- 8 files changed, 19 insertions(+), 18 deletions(-) diff --git a/Core/Dialog/PSPSaveDialog.cpp b/Core/Dialog/PSPSaveDialog.cpp index 3185a43a0b..8136491f4a 100644 --- a/Core/Dialog/PSPSaveDialog.cpp +++ b/Core/Dialog/PSPSaveDialog.cpp @@ -230,7 +230,7 @@ void PSPSaveDialog::DisplaySaveDataInfo1() else { char txt[1024]; - sprintf(txt,"%s\n%02d/%02d/%d %02d:%02d %d KB\n%s\n%s" + sprintf(txt,"%s\n%02d/%02d/%d %02d:%02d %lld KB\n%s\n%s" , param.GetFileInfo(currentSelectedSave).title , param.GetFileInfo(currentSelectedSave).modif_time.tm_mday , param.GetFileInfo(currentSelectedSave).modif_time.tm_mon + 1 @@ -254,7 +254,7 @@ void PSPSaveDialog::DisplaySaveDataInfo2() else { char txt[1024]; - sprintf(txt,"%s\n%02d/%02d/%d %02d:%02d\n%d KB" + sprintf(txt,"%s\n%02d/%02d/%d %02d:%02d\n%lld KB" , param.GetFileInfo(currentSelectedSave).saveTitle , param.GetFileInfo(currentSelectedSave).modif_time.tm_mday , param.GetFileInfo(currentSelectedSave).modif_time.tm_mon + 1 diff --git a/Core/HLE/__sceAudio.cpp b/Core/HLE/__sceAudio.cpp index db1cc7332a..fc474706f0 100644 --- a/Core/HLE/__sceAudio.cpp +++ b/Core/HLE/__sceAudio.cpp @@ -186,7 +186,7 @@ void __AudioUpdate() } else { // This happens quite a lot. There's still something slightly off // about the amount of audio we produce. - DEBUG_LOG(HLE, "Audio outbuffer overrun! room = %i / %i", outAudioQueue.room(), outAudioQueue.capacity()); + DEBUG_LOG(HLE, "Audio outbuffer overrun! room = %i / %i", outAudioQueue.room(), (u32)outAudioQueue.capacity()); } } diff --git a/Core/HLE/sceAudio.cpp b/Core/HLE/sceAudio.cpp index fcb869687c..563824421c 100644 --- a/Core/HLE/sceAudio.cpp +++ b/Core/HLE/sceAudio.cpp @@ -186,7 +186,7 @@ u32 sceAudioChReserve(u32 channel, u32 sampleCount, u32 format) //.Allocate soun { WARN_LOG(HLE, "WARNING: Reserving already reserved channel. Error?"); } - DEBUG_LOG(HLE, "%i = sceAudioChReserve(%i, %i, %i)", channel, sampleCount, format); + DEBUG_LOG(HLE, "sceAudioChReserve(channel = %d, sampleCount = %d, format = %d)", channel, sampleCount, format); chans[channel].sampleCount = sampleCount; chans[channel].reserved = true; diff --git a/Core/HLE/sceKernelInterrupt.cpp b/Core/HLE/sceKernelInterrupt.cpp index a8eaa41e3c..0c7b71296f 100644 --- a/Core/HLE/sceKernelInterrupt.cpp +++ b/Core/HLE/sceKernelInterrupt.cpp @@ -295,7 +295,7 @@ void __TriggerInterrupt(int type, PSPInterrupt intno, int subintr) if (interruptsEnabled || (type & PSP_INTR_ONLY_IF_ENABLED) == 0) { intrHandlers[intno].queueUp(subintr); - DEBUG_LOG(HLE, "Triggering subinterrupts for interrupt %i sub %i (%i in queue)", intno, subintr, pendingInterrupts.size()); + DEBUG_LOG(HLE, "Triggering subinterrupts for interrupt %i sub %i (%i in queue)", intno, subintr, (u32)pendingInterrupts.size()); __TriggerRunInterrupts(type); } } @@ -305,7 +305,8 @@ void __TriggerInterruptWithArg(int type, PSPInterrupt intno, int subintr, int ar if (interruptsEnabled || (type & PSP_INTR_ONLY_IF_ENABLED) == 0) { intrHandlers[intno].queueUpWithArg(subintr, arg); - DEBUG_LOG(HLE, "Triggering subinterrupts for interrupt %i sub %i with arg %i (%i in queue)", intno, subintr, arg, pendingInterrupts.size()); + DEBUG_LOG(HLE, "Triggering subinterrupts for interrupt %i sub %i with arg %i (%i in queue)", intno, subintr, arg, + (u32)pendingInterrupts.size()); __TriggerRunInterrupts(type); } } diff --git a/Core/HLE/sceKernelThread.cpp b/Core/HLE/sceKernelThread.cpp index 6523d8ba3a..446fe4a871 100644 --- a/Core/HLE/sceKernelThread.cpp +++ b/Core/HLE/sceKernelThread.cpp @@ -981,7 +981,7 @@ int sceKernelCreateThread(const char *threadName, u32 entry, u32 prio, int stack __KernelCreateThread(id, curModule, threadName, entry, prio, stacksize, attr); INFO_LOG(HLE, "%i = sceKernelCreateThread(name=\"%s\", entry=%08x, prio=%x, stacksize=%i)", id, threadName, entry, prio, stacksize); if (optionAddr != 0) - WARN_LOG(HLE, "sceKernelCreateThread: unsupported options parameter.", threadName); + WARN_LOG(HLE, "sceKernelCreateThread(name=\"%s\"): unsupported options parameter %08x", threadName, optionAddr); return id; } diff --git a/Core/HLE/sceRtc.cpp b/Core/HLE/sceRtc.cpp index 38447046fa..40df086d01 100644 --- a/Core/HLE/sceRtc.cpp +++ b/Core/HLE/sceRtc.cpp @@ -435,7 +435,7 @@ int sceRtcSetTime_t(u32 datePtr, u32 time) int sceRtcSetTime64_t(u32 datePtr, u64 time) { - ERROR_LOG(HLE, "HACK sceRtcSetTime64_t(%d,%d)", datePtr, time); + ERROR_LOG(HLE, "HACK sceRtcSetTime64_t(%d,%lld)", datePtr, time); if (Memory::IsValidAddress(datePtr)) { ScePspDateTime pt; @@ -453,7 +453,7 @@ int sceRtcSetTime64_t(u32 datePtr, u64 time) int sceRtcGetTime_t(u32 datePtr, u32 timePtr) { - ERROR_LOG(HLE, "HACK sceRtcGetTime_t(%d,%d)", datePtr, time); + ERROR_LOG(HLE, "HACK sceRtcGetTime_t(%d,%d)", datePtr, timePtr); if (Memory::IsValidAddress(datePtr)&&Memory::IsValidAddress(timePtr)) { ScePspDateTime pt; @@ -472,7 +472,7 @@ int sceRtcGetTime_t(u32 datePtr, u32 timePtr) int sceRtcGetTime64_t(u32 datePtr, u32 timePtr) { - ERROR_LOG(HLE, "HACK sceRtcGetTime64_t(%d,%d)", datePtr, time); + ERROR_LOG(HLE, "HACK sceRtcGetTime64_t(%d,%d)", datePtr, timePtr); if (Memory::IsValidAddress(datePtr)&&Memory::IsValidAddress(timePtr)) { ScePspDateTime pt; @@ -568,7 +568,7 @@ int sceRtcTickAddTicks(u32 destTickPtr, u32 srcTickPtr, u64 numTicks) Memory::Write_U64(srcTick, destTickPtr); } - DEBUG_LOG(HLE, "sceRtcTickAddTicks(%d,%d,%d)", destTickPtr, srcTickPtr, numTicks); + DEBUG_LOG(HLE, "sceRtcTickAddTicks(%x,%x,%llu)", destTickPtr, srcTickPtr, numTicks); return 0; } @@ -582,7 +582,7 @@ int sceRtcTickAddMicroseconds(u32 destTickPtr,u32 srcTickPtr, u64 numMS) Memory::Write_U64(srcTick, destTickPtr); } - ERROR_LOG(HLE, "HACK sceRtcTickAddMicroseconds(%d,%d,%d)", destTickPtr, srcTickPtr, numMS); + ERROR_LOG(HLE, "HACK sceRtcTickAddMicroseconds(%x,%x,%llu)", destTickPtr, srcTickPtr, numMS); return 0; } @@ -595,7 +595,7 @@ int sceRtcTickAddSeconds(u32 destTickPtr, u32 srcTickPtr, u64 numSecs) srcTick += numSecs * 1000000UL; Memory::Write_U64(srcTick, destTickPtr); } - ERROR_LOG(HLE, "HACK sceRtcTickAddSeconds(%d,%d,%d)", destTickPtr, srcTickPtr, numSecs); + ERROR_LOG(HLE, "HACK sceRtcTickAddSeconds(%x,%x,%llu)", destTickPtr, srcTickPtr, numSecs); return 0; } @@ -608,7 +608,7 @@ int sceRtcTickAddMinutes(u32 destTickPtr, u32 srcTickPtr, u64 numMins) srcTick += numMins*60000000UL; Memory::Write_U64(srcTick, destTickPtr); } - ERROR_LOG(HLE, "HACK sceRtcTickAddMinutes(%d,%d,%d)", destTickPtr, srcTickPtr, numMins); + ERROR_LOG(HLE, "HACK sceRtcTickAddMinutes(%x,%x,%llu)", destTickPtr, srcTickPtr, numMins); return 0; } diff --git a/GPU/GLES/DisplayListInterpreter.cpp b/GPU/GLES/DisplayListInterpreter.cpp index d516cfe9e4..40dc5b5ffa 100644 --- a/GPU/GLES/DisplayListInterpreter.cpp +++ b/GPU/GLES/DisplayListInterpreter.cpp @@ -44,11 +44,11 @@ extern u32 curTextureWidth; extern u32 curTextureHeight; GLES_GPU::GLES_GPU(int renderWidth, int renderHeight) - : interruptsEnabled_(true), +: interruptsEnabled_(true), + displayFramebufPtr_(0), renderWidth_(renderWidth), renderHeight_(renderHeight), - dlIdGenerator(1), - displayFramebufPtr_(0) + dlIdGenerator(1) { renderWidthFactor_ = (float)renderWidth / 480.0f; renderHeightFactor_ = (float)renderHeight / 272.0f; diff --git a/GPU/GLES/VertexShaderGenerator.cpp b/GPU/GLES/VertexShaderGenerator.cpp index 395021ce56..e4b7153c52 100644 --- a/GPU/GLES/VertexShaderGenerator.cpp +++ b/GPU/GLES/VertexShaderGenerator.cpp @@ -321,7 +321,7 @@ char *GenerateVertexShader(int prim) WRITE(p, " float dot%i = dot(normalize(toLight%i), worldnormal);\n", i, i); if (poweredDiffuse) { - WRITE(p, " dot%i = pow(dot%i, u_matspecular.a);\n"); + WRITE(p, " dot%i = pow(dot%i, u_matspecular.a);\n", i, i); } if (doLight[i] == LIGHT_DOTONLY)