atsb / Doom64EX-Plus

An improved modern version of Doom64EX.
GNU General Public License v2.0
100 stars 16 forks source link

fix func proto mismatches resulting in warnings with -flto #231

Closed bubbleguuum closed 4 months ago

bubbleguuum commented 4 months ago

fixes these GCC warnings at link time when compiled with -flto=auto.

src/engine/p_map.c:710:6: warning: type of ‘P_ZMovement’ does not match original declaration [-Wlto-type-mismatch]
  710 | void P_ZMovement(mobj_t* mo, int checkmissile);
      |      ^
src/engine/p_mobj.c:297:6: note: type mismatch in parameter 2
  297 | void P_ZMovement(mobj_t* mo) {
      |      ^
src/engine/p_mobj.c:297:6: note: type ‘void’ should match type ‘int’
src/engine/p_mobj.c:297:6: note: ‘P_ZMovement’ was previously declared here
src/engine/g_game.c:71:13: warning: type of ‘M_SaveGame’ does not match original declaration [-Wlto-type-mismatch]
   71 | extern void M_SaveGame(void);
      |             ^
src/engine/m_menu.c:3205:6: note: type mismatch in parameter 1
 3205 | void M_SaveGame(int choice) {
      |      ^
src/engine/m_menu.c:3205:6: note: type ‘int’ should match type ‘void’
src/engine/m_menu.c:3205:6: note: ‘M_SaveGame’ was previously declared here
src/engine/g_game.c:72:13: warning: type of ‘M_LoadGame’ does not match original declaration [-Wlto-type-mismatch]
   72 | extern void M_LoadGame(void);
      |             ^
src/engine/m_menu.c:3304:6: note: type mismatch in parameter 1
 3304 | void M_LoadGame(int choice) {
      |      ^
src/engine/m_menu.c:3304:6: note: type ‘int’ should match type ‘void’
src/engine/m_menu.c:3304:6: note: ‘M_LoadGame’ was previously declared here