Squelch compiler warning about type punning
Jeffrey Pfau jeffrey@endrift.com
Fri, 31 Jan 2014 02:29:27 -0800
1 files changed,
2 insertions(+),
1 deletions(-)
jump to
M
src/gba/gba.c
→
src/gba/gba.c
@@ -561,7 +561,8 @@
void _checkOverrides(struct GBA* gba, uint32_t id) { int i; for (i = 0; _overrides[i].id[0]; ++i) { - if (*(uint32_t*) &_overrides[i].id == id) { + const uint32_t* overrideId = (const uint32_t*) _overrides[i].id; + if (*overrideId == id) { switch (_overrides[i].type) { case SAVEDATA_FLASH512: case SAVEDATA_FLASH1M: