From ad02a0e0f38b8de7f35cb6c5e72c0836d47f276f Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Thu, 27 Feb 2020 21:13:47 -0800 Subject: [PATCH] GBA: More warning fixes --- src/gba/gba.c | 7 +++---- src/gba/renderers/software-obj.c | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/gba/gba.c b/src/gba/gba.c index da153ea60..1ae1ae832 100644 --- a/src/gba/gba.c +++ b/src/gba/gba.c @@ -51,7 +51,7 @@ static void _triggerIRQ(struct mTiming*, void* user, uint32_t cyclesLate); #ifdef USE_DEBUGGERS static bool _setSoftwareBreakpoint(struct ARMDebugger*, uint32_t address, enum ExecutionMode mode, uint32_t* opcode); -static bool _clearSoftwareBreakpoint(struct ARMDebugger*, uint32_t address, enum ExecutionMode mode, uint32_t opcode); +static void _clearSoftwareBreakpoint(struct ARMDebugger*, const struct ARMDebugBreakpoint*); #endif #ifdef FIXED_ROM_BUFFER @@ -918,8 +918,7 @@ static bool _setSoftwareBreakpoint(struct ARMDebugger* debugger, uint32_t addres return true; } -static bool _clearSoftwareBreakpoint(struct ARMDebugger* debugger, uint32_t address, enum ExecutionMode mode, uint32_t opcode) { - GBAClearBreakpoint((struct GBA*) debugger->cpu->master, address, mode, opcode); - return true; +static void _clearSoftwareBreakpoint(struct ARMDebugger* debugger, const struct ARMDebugBreakpoint* breakpoint) { + GBAClearBreakpoint((struct GBA*) debugger->cpu->master, breakpoint->d.address, breakpoint->sw.mode, breakpoint->sw.opcode); } #endif \ No newline at end of file diff --git a/src/gba/renderers/software-obj.c b/src/gba/renderers/software-obj.c index d49142ecf..bc8e7f9a3 100644 --- a/src/gba/renderers/software-obj.c +++ b/src/gba/renderers/software-obj.c @@ -158,7 +158,7 @@ int GBAVideoSoftwareRendererPreprocessSprite(struct GBAVideoSoftwareRenderer* re x >>= 23; x += renderer->objOffsetX; uint16_t* vramBase = &renderer->d.vram[BASE_TILE >> 1]; - bool align = GBAObjAttributesAIs256Color(sprite->a) && !GBARegisterDISPCNTIsObjCharacterMapping(renderer->dispcnt); + unsigned align = GBAObjAttributesAIs256Color(sprite->a) && !GBARegisterDISPCNTIsObjCharacterMapping(renderer->dispcnt); unsigned charBase = (GBAObjAttributesCGetTile(sprite->c) & ~align) * 0x20; if (GBARegisterDISPCNTGetMode(renderer->dispcnt) >= 3 && GBAObjAttributesCGetTile(sprite->c) < 512) { return 0;