Skip to content

Build the port without warnings - #241

Open
SirFancyBacon wants to merge 1 commit into
TheMoonPeople:masterfrom
SirFancyBacon:fix/compiler-warnings
Open

SirFancyBacon wants to merge 1 commit into
TheMoonPeople:masterfrom
SirFancyBacon:fix/compiler-warnings

Conversation

@SirFancyBacon

@SirFancyBacon SirFancyBacon commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Build the port without warnings

The PC build gave nine compiler warnings. This clears them all without changing what the game does.
fixes #242

  • battlemenu.cpp: the debug weapon-stat cheat printed "now 20%\n", an invalid conversion.
    It prints the percent sign now (%%).
  • menu_dungeon.cpp: ConvDebugSelectToExcelListNo rejected the numbers above the Scorpion
    (352) and below Super Steve (312). That range is empty, and retail's source has the same check, so
    it never rejected anything. The dead check is gone.
  • Two variables read before being set, in dungeonmap.cpp and menu_save.cpp. Retail reads
    them the same way. The build's zero-initialization already made them zero; they now start at zero
    explicitly.
    • event_x and event_y are the Atla events' origin.
    • slot is the event item board's pick past its last item.
  • dun/gameloop.cpp, editground.cpp: six memcpy calls copy an effect or a map part over
    another object of the same class, so the vtable pointer they copy is the class's own. Both ends
    are cast to void * to tell the compiler this is deliberate.

Testing

  • The Linux build has no warnings.
  • The test suite passes, apart from the GPU tests that need the Vulkan validation layer or a
    hardware renderer.

The PC build gave nine warnings, none of them a change in behaviour to
make:

- The debug weapon-stat cheat's messages printed a stray conversion,
  "%\n"; they print the percent sign now.
- The debug item list's converter ruled out a range above the Scorpion
  (352) and below Super Steve (312), which holds no number, as retail's
  does; the empty check is gone.
- The Atla events' origin and the event item board's pick past the last
  item were read unset, as retail reads them; they are zero, as the
  build's zero-initialisation already made them, and say so.
- Six copies of an effect or a map part over another of its class copy
  the class's own vtable pointer; the copies say so to the compiler.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Menu Pointer Alignment is Off Center

1 participant