Skip to content

Commit

Permalink
gcc: fix crash on non-void func. without return
Browse files Browse the repository at this point in the history
make it workable with aggresive optimization flags
  • Loading branch information
Apaczer committed Sep 5, 2024
1 parent 2e1cf40 commit 38e916e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/burn/zet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -512,17 +512,17 @@ int ZetPc(int n)

int ZetBc(int n)
{

return 0;
}

int ZetDe(int n)
{

return 0;
}

int ZetHL(int n)
{

return 0;
}

int ZetScan(int nAction)
Expand Down Expand Up @@ -571,7 +571,7 @@ int ZetNmi()
int ZetIdle(int nCycles)
{
Drz80.nCyclesTotal += nCycles;

return 0;
}

int ZetSegmentCycles()
Expand Down
2 changes: 2 additions & 0 deletions src/sdl-dingux/sdl_progress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ int ProgressCreate()
//DrawString("Based on FinalBurnAlpha", (uint16 *)load_screen->pixels, 10, 35, fwidth);
DrawString("Now loading ...", (uint16 *)load_screen->pixels, 10, 105, fwidth);
show_rom_loading_text("Reading ROM", 0, 0);
return 0;
}

int ProgressDestroy()
Expand All @@ -102,6 +103,7 @@ int ProgressDestroy()
SDL_FreeSurface(load_screen);
load_screen = NULL;
}
return 0;
}

int ProgressUpdateBurner(double dProgress, const TCHAR* pszText, bool bAbs)
Expand Down
2 changes: 2 additions & 0 deletions src/sdl-dingux/state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ static int StateInfo(int* pnLen, int* pnMinVer, int bAll)
static int __cdecl ReadAcb(struct BurnArea* pba)
{
fread(pba->Data, 1, pba->nLen, bfp);
return 0;
}

// State load
Expand Down Expand Up @@ -198,6 +199,7 @@ static int __cdecl WriteAcb(struct BurnArea *pba)
//printf("WRITE ACB - len: %i, name: %s\n", pba->nLen, pba->szName);
fwrite(pba->Data, 1, pba->nLen, bfp);
nTotalLen += pba->nLen;
return 0;
}

// Write a savestate as a chunk of an "FBS " file
Expand Down

0 comments on commit 38e916e

Please sign in to comment.