Clang 15 doesn't like heretic and hexen code
Background
Version of Chocolate Doom: git master
Operating System and version: Any
Game: Heretic/Hexen
Bug description
Clang 15 is releasing shortly and it doesn't like heretic and hexen:
src/heretic/p_mobj.c:76:19: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
This is the code:
https://github.com/chocolate-doom/chocolate-doom/blob/e49be7669f9072e2e27e67e29c097591a83bbf06/src/heretic/p_mobj.c#L76
And action is declared here:
https://github.com/chocolate-doom/chocolate-doom/blob/e49be7669f9072e2e27e67e29c097591a83bbf06/src/heretic/info.h#L1371
It has no declared parameters and it's not possible to just add one because it's also called with two (different) parameters here:
https://github.com/chocolate-doom/chocolate-doom/blob/e49be7669f9072e2e27e67e29c097591a83bbf06/src/heretic/p_pspr.c#L342
This is not the only one, full list of errors:
src/hexen/p_tick.c:104:41: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
src/hexen/p_mobj.c:106:19: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
src/hexen/p_pspr.c:248:26: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
src/hexen/sv_save.c:2833:32: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
src/hexen/sv_save.c:2862:31: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
src/hexen/sv_save.c:2866:38: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
src/heretic/p_tick.c:128:41: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
src/heretic/p_pspr.c:342:26: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
I guess we'll have to go back to this "experimental stuff": https://github.com/chocolate-doom/chocolate-doom/blob/e49be7669f9072e2e27e67e29c097591a83bbf06/src/doom/d_think.h#L29-L45
It has also been removed in Boom/MBF.
Or we can go the always-three-arguments route that I have chosen for Crispy back then (though for different reasons):
https://github.com/fabiangreffrath/crispy-doom/commit/370c8443c9146e00a7f802cf40c705ec31c9cea2
I think always having three (or maybe two?) parameters sounds like the best way for me. The downside is that a lot of functions need updating. The crispy-doom commit seems to be about doom while this is in heretic/hexen.