Fix warnings

This commit is contained in:
Tillmann Karras 2015-03-16 10:56:16 +01:00
parent c73cac3ee9
commit f82afd1b2f
4 changed files with 9 additions and 9 deletions

View File

@ -109,7 +109,7 @@ bool Jitx86Base::BackPatch(u32 emAddress, SContext* ctx)
if (codePtr[totalSize] != 0xc1 || codePtr[totalSize + 2] != 0x10)
{
PanicAlert("BackPatch: didn't find expected shift %p", codePtr);
return nullptr;
return false;
}
info.signExtend = (codePtr[totalSize + 1] & 0x10) != 0;
totalSize += 3;
@ -168,7 +168,7 @@ bool Jitx86Base::BackPatch(u32 emAddress, SContext* ctx)
if (it3 == pcAtLoc.end())
{
PanicAlert("BackPatch: no pc entry for address %p", codePtr);
return nullptr;
return false;
}
u32 pc = it3->second;

View File

@ -23,7 +23,7 @@ public:
void SwapInterval(int Interval) override;
void Swap() override;
void* GetFuncAddress(const std::string& name) override;
bool Create(void *window_handle);
bool Create(void *window_handle) override;
bool MakeCurrent() override;
bool ClearCurrent() override;
void Shutdown() override;

View File

@ -33,7 +33,7 @@
bool g_bRecordFifoData = false;
bool g_bFifoErrorSeen = false;
static bool s_bFifoErrorSeen = false;
static u32 InterpretDisplayList(u32 address, u32 size)
{
@ -125,7 +125,7 @@ static void UnknownOpcode(u8 cmd_byte, void *buffer, bool preprocess)
void OpcodeDecoder_Init()
{
g_bFifoErrorSeen = false;
s_bFifoErrorSeen = false;
}
@ -291,10 +291,10 @@ u8* OpcodeDecoder_Run(DataReader src, u32* cycles, bool in_display_list)
}
else
{
if (!g_bFifoErrorSeen)
if (!s_bFifoErrorSeen)
UnknownOpcode(cmd_byte, opcodeStart, is_preprocess);
ERROR_LOG(VIDEO, "FIFO: Unknown Opcode(0x%02x @ %p, preprocessing = %s)", cmd_byte, opcodeStart, is_preprocess ? "yes" : "no");
g_bFifoErrorSeen = true;
s_bFifoErrorSeen = true;
totalCycles += 1;
}
break;

View File

@ -108,12 +108,12 @@ TEST_F(MappingTest, ReadWriteComplex)
m_mapping->Register(0x0C001234,
MMIO::ComplexRead<u8>([&read_called](u32 addr) {
EXPECT_EQ(0x0C001234, addr);
EXPECT_EQ(0x0C001234u, addr);
read_called = true;
return 0x12;
}),
MMIO::ComplexWrite<u8>([&write_called](u32 addr, u8 val) {
EXPECT_EQ(0x0C001234, addr);
EXPECT_EQ(0x0C001234u, addr);
EXPECT_EQ(0x34, val);
write_called = true;
})