Fix valgrind-found uninitialized values
Jeffrey Pfau jeffrey@endrift.com
Fri, 18 Oct 2013 08:42:15 -0700
4 files changed,
6 insertions(+),
1 deletions(-)
M
src/arm/arm.c
→
src/arm/arm.c
@@ -106,6 +106,7 @@
cpu->executionMode = MODE_THUMB; _ARMSetMode(cpu, MODE_ARM); + cpu->currentPC = 0; int currentCycles = 0; ARM_WRITE_PC;
M
src/gba/gba-savedata.c
→
src/gba/gba-savedata.c
@@ -46,7 +46,9 @@ break;
default: break; } - close(savedata->fd); + if (savedata->fd >= 0) { + close(savedata->fd); + } savedata->type = SAVEDATA_NONE; }
M
src/gba/gba.c
→
src/gba/gba.c
@@ -58,6 +58,7 @@ GBAAudioInit(&gba->audio);
GBAIOInit(gba); + gba->timersEnabled = 0; memset(gba->timers, 0, sizeof(gba->timers)); gba->springIRQ = 0;
M
src/platform/sdl/gl-main.c
→
src/platform/sdl/gl-main.c
@@ -57,6 +57,7 @@ return 1;
} sigset_t signals; + sigemptyset(&signals); sigaddset(&signals, SIGINT); sigaddset(&signals, SIGTRAP); pthread_sigmask(SIG_BLOCK, &signals, 0);