Fix/suppress warnings when building with gcc-8

This commit is contained in:
PikalaxALT
2019-06-26 16:23:00 -04:00
parent fb06e4a3c9
commit b839c21307
37 changed files with 114 additions and 111 deletions

View File

@@ -85,7 +85,14 @@ void EnableVCountIntrAtLine150(void);
void AgbMain()
{
RegisterRamReset(MODERN ? RESET_ALL & ~RESET_IWRAM : RESET_ALL);
#if MODERN
// Modern compilers are liberal with the stack on entry to this function,
// so RegisterRamReset may crash if it resets IWRAM.
RegisterRamReset(RESET_ALL & ~RESET_IWRAM);
DmaFill32(3, 0, IWRAM_START, 0x7E00);
#else
RegisterRamReset(RESET_ALL);
#endif //MODERN
*(vu16 *)BG_PLTT = 0x7FFF;
InitGpuRegManager();
REG_WAITCNT = WAITCNT_PREFETCH_ENABLE | WAITCNT_WS0_S_1 | WAITCNT_WS0_N_3;