Fix some init/type warnings.

This commit is contained in:
Unknown W. Brackets 2013-05-31 22:40:50 -07:00
parent 98f99e1e3c
commit 06c19622d5
9 changed files with 12 additions and 12 deletions

View File

@ -103,7 +103,7 @@ std::vector<int> CWCheatEngine::GetNextCode() {
void CWCheatEngine::SkipCodes(int count) {
for (int i = 0; i < count; i ++) {
if (GetNextCode()[0] == NULL) {
if (GetNextCode()[0] == 0) {
break;
}
}

View File

@ -171,7 +171,7 @@ void ElfReader::LoadRelocations2(int rel_seg)
int flag_table_size, type_table_size;
int flag_bits, seg_bits, type_bits;
int cmd, flag, seg, type;
int off_seg, addr_seg, rel_base, rel_offset;
int off_seg = 0, addr_seg, rel_base, rel_offset;
int relocate_to, last_type, lo16;
u32 op, addr;
int rcount = 0;

View File

@ -194,7 +194,7 @@ bool MetaFileSystem::MapFilePath(const std::string &_inpath, std::string &outpat
if (inpath.find(':') == std::string::npos /* means path is relative */)
{
ioErrorCode = SCE_KERNEL_ERROR_NOCWD;
WARN_LOG_REPORT(HLE, "Path is relative, but current directory not set for thread %i. returning 8002032C(SCE_KERNEL_ERROR_NOCWD) instead.", currentThread, startingDirectory.c_str());
WARN_LOG_REPORT(HLE, "Path is relative, but current directory not set for thread %i. returning 8002032C(SCE_KERNEL_ERROR_NOCWD) instead.", currentThread);
}
}
else

View File

@ -71,7 +71,7 @@ void __AudioInit()
CoreTiming::ScheduleEvent(usToCycles(audioIntervalUs), eventAudioUpdate, 0);
CoreTiming::ScheduleEvent(usToCycles(audioHostIntervalUs), eventHostAudioUpdate, 0);
for (int i = 0; i < PSP_AUDIO_CHANNEL_MAX + 1; i++)
for (u32 i = 0; i < PSP_AUDIO_CHANNEL_MAX + 1; i++)
chans[i].clear();
}
@ -103,7 +103,7 @@ void __AudioDoState(PointerWrap &p)
void __AudioShutdown()
{
for (int i = 0; i < PSP_AUDIO_CHANNEL_MAX + 1; i++)
for (u32 i = 0; i < PSP_AUDIO_CHANNEL_MAX + 1; i++)
chans[i].clear();
}
@ -220,7 +220,7 @@ void __AudioUpdate()
s32 mixBuffer[hwBlockSize * 2];
memset(mixBuffer, 0, sizeof(mixBuffer));
for (int i = 0; i < PSP_AUDIO_CHANNEL_MAX + 1; i++)
for (u32 i = 0; i < PSP_AUDIO_CHANNEL_MAX + 1; i++)
{
if (!chans[i].reserved)
continue;

View File

@ -545,7 +545,7 @@ u32 sceAtracDecodeData(int atracID, u32 outAddr, u32 numSamplesAddr, u32 finishF
inbytes = std::min(inbytes, (int)atrac->atracBytesPerFrame);
if (inbytes > 0) {
Atrac3plus_Decoder::atrac3plus_decode(atrac->decoder_context, atrac->data_buf + atrac->decodePos, inbytes, &decodebytes, buf);
DEBUG_LOG(HLE, "decodebytes: %i outbuf: %08p", decodebytes, buf);
DEBUG_LOG(HLE, "decodebytes: %i outbuf: %p", decodebytes, buf);
atrac->sampleQueue.push(buf, decodebytes);
}
}

View File

@ -24,7 +24,7 @@
#include "Core/HLE/sceAudio.h"
#include "Core/HLE/__sceAudio.h"
const int PSP_AUDIO_SAMPLE_MAX = 65536 - 64;
const u32 PSP_AUDIO_SAMPLE_MAX = 65536 - 64;
const int PSP_AUDIO_ERROR_SRC_FORMAT_4 = 0x80000003;
void AudioChannel::DoState(PointerWrap &p)
@ -192,7 +192,7 @@ u32 sceAudioChReserve(int chan, u32 sampleCount, u32 format) {
return SCE_ERROR_AUDIO_NO_CHANNELS_AVAILABLE;
}
}
if (chan >= PSP_AUDIO_CHANNEL_MAX) {
if ((u32)chan >= PSP_AUDIO_CHANNEL_MAX) {
ERROR_LOG(HLE, "sceAudioChReserve(%08x, %08x, %08x) - bad channel", chan, sampleCount, format);
return SCE_ERROR_AUDIO_INVALID_CHANNEL;
}

View File

@ -42,7 +42,7 @@ enum PspAudioFrequencies { PSP_AUDIO_FREQ_44K = 44100, PSP_AUDIO_FREQ_48K = 48
#define SCE_ERROR_AUDIO_CHANNEL_ALREADY_RESERVED 0x80268002
const int PSP_AUDIO_CHANNEL_MAX = 8;
const u32 PSP_AUDIO_CHANNEL_MAX = 8;
const int PSP_AUDIO_CHANNEL_SRC = 8;
const int PSP_AUDIO_CHANNEL_OUTPUT2 = 8;

View File

@ -1108,7 +1108,7 @@ void sceKernelStartModule(u32 moduleId, u32 argsize, u32 argAddr, u32 returnValu
entryAddr = module->nm.module_start_func;
attribute = module->nm.module_start_thread_attr;
}
else if ((entryAddr == -1) || entryAddr == module->memoryBlockAddr - 1)
else if ((entryAddr == (u32)-1) || entryAddr == module->memoryBlockAddr - 1)
{
if (optionAddr)
{

View File

@ -923,7 +923,7 @@ void __KernelThreadingInit()
Memory::Memcpy(idleThreadHackAddr, idleThreadCode, sizeof(idleThreadCode));
u32 pos = idleThreadHackAddr + sizeof(idleThreadCode);
for (int i = 0; i < ARRAY_SIZE(threadHacks); ++i) {
for (size_t i = 0; i < ARRAY_SIZE(threadHacks); ++i) {
__KernelWriteFakeSysCall(threadHacks[i].nid, threadHacks[i].addr, pos);
}