declaring _sbss as an array prevents warnings when zeroing it

This commit is contained in:
Wolfgang Thaller 2017-10-08 20:55:24 +02:00
parent bc200ad489
commit 19277b3d2e

View File

@ -175,7 +175,7 @@ static pascal void PatchedExitToShell()
}
// section boundaries
extern uint8_t _stext, _etext, _sdata, _edata, _sbss, _ebss;
extern uint8_t _stext, _etext, _sdata, _edata, _sbss[], _ebss;
void Retro68InitMultisegApp()
{
@ -196,11 +196,11 @@ void Retro68InitMultisegApp()
// Zero-initialize bss
for(uint32_t *p = (uint32_t*) &_sbss;
p < (uint32_t*) &_ebss; ++p)
*p = 0;
*p = 0;
// Set up patched LoadSeg
// NOTE: OriginalLoadSeg is the first global variable we can use
// NOTE: OriginalLoadSeg is the first global variable we can use
OriginalLoadSeg = (void(*)(short)) GetToolTrapAddress(_LoadSeg);
OriginalUnloadSeg = (void(*)(void*)) GetToolTrapAddress(_UnLoadSeg);
OriginalExitToShell = (void(*)()) GetToolTrapAddress(_ExitToShell);