andrei-drexler / ironwail

High-performance QuakeSpasm fork
GNU General Public License v2.0
489 stars 43 forks source link

GCC/Clang compilation failure #158

Closed alexey-lysiuk closed 1 year ago

alexey-lysiuk commented 1 year ago

Compilation of a160f4ffaf434b526a2415ed5803adde089f7163 with GCC or Clang fails with the following errors:

Quake/menu.c:3925:13: error: static declaration of ‘M_Video_Key’ follows non-static declaration
 3925 | static void M_Video_Key (int key)
      |             ^~~~~~~~~~~
Quake/menu.c:119:22: note: previous declaration of ‘M_Video_Key’ with type ‘void(int)’
  119 |                 void M_Video_Key (int key);
      |                      ^~~~~~~~~~~
Quake/menu.c:4148:13: error: static declaration of ‘M_Video_Mousemove’ follows non-static declaration
 4148 | static void M_Video_Mousemove (int cx, int cy)
      |             ^~~~~~~~~~~~~~~~~
Quake/menu.c:140:22: note: previous declaration of ‘M_Video_Mousemove’ with type ‘void(int,  int)’
  140 |                 void M_Video_Mousemove (int cx, int cy);
      |                      ^~~~~~~~~~~~~~~~~
Quake/menu.c:4165:13: error: static declaration of ‘M_Video_Draw’ follows non-static declaration
 4165 | static void M_Video_Draw (void)
      |             ^~~~~~~~~~~~
Quake/menu.c:98:22: note: previous declaration of ‘M_Video_Draw’ with type ‘void(void)’
   98 |                 void M_Video_Draw (void);
      |                      ^~~~~~~~~~~~
Quake/menu.c:4285:13: error: static declaration of ‘M_Menu_Video_f’ follows non-static declaration
 4285 | static void M_Menu_Video_f (void)
      |             ^~~~~~~~~~~~~~
Quake/menu.c:77:22: note: previous declaration of ‘M_Menu_Video_f’ with type ‘void(void)’
   77 |                 void M_Menu_Video_f (void);
      |                      ^~~~~~~~~~~~~~

The given functions should be forward declared as static, or static should be removed from definitions to match with rest of the menu functions.

andrei-drexler commented 1 year ago

Thanks, should be fixed in abfc2a44ef1a952882e4c5ad65ffe32a89e00415.