all repos — mgba @ 38a4e9988f8c6c210b2fd70790ff1f0f7006515b

mGBA Game Boy Advance Emulator

All: Silence a few warnings
Jeffrey Pfau jeffrey@endrift.com
Wed, 31 Dec 2014 03:11:06 -0800
commit

38a4e9988f8c6c210b2fd70790ff1f0f7006515b

parent

aaf96b43cd02bfb878e04011ffb1dafe418fcd33

2 files changed, 4 insertions(+), 2 deletions(-)

jump to
M src/gba/gba-bios.csrc/gba/gba-bios.c

@@ -237,7 +237,7 @@ static void _unLz77(struct GBA* gba, uint32_t source, uint32_t dest, int width) {

struct ARMCore* cpu = gba->cpu; int remaining = (cpu->memory.load32(cpu, source, 0) & 0xFFFFFF00) >> 8; // We assume the signature byte (0x10) is correct - int blockheader; + int blockheader = 0; // Some compilers warn if this isn't set, even though it's trivially provably always set uint32_t sPointer = source + 4; uint32_t dPointer = dest; int blocksRemaining = 0;

@@ -380,7 +380,7 @@ int blockheader;

int block; uint32_t sPointer = source + 4; uint32_t dPointer = dest; - int halfword; + int halfword = 0; while (remaining > 0) { blockheader = cpu->memory.loadU8(cpu, sPointer++, 0); if (blockheader & 0x80) {
M src/gba/gba-cli.csrc/gba/gba-cli.c

@@ -42,6 +42,8 @@ debugger->d.name = "Game Boy Advance";

debugger->d.commands = _GBACLIDebuggerCommands; debugger->context = context; +#else + UNUSED(context); #endif return debugger;