Commit graph

2 commits

Author SHA1 Message Date
Mitchell Richters
33bc4b08cb - Modernise function declarations in Cephis C math to address ongoing GCC and Clang warnings.
Examples:

/home/mrichters/Repos/Raze/source/common/thirdparty/math/exp.c: In function ‘c_exp’:
/home/mrichters/Repos/Raze/source/common/thirdparty/math/exp.c:171:48: warning: declaration of built-in function ‘floor’ without a prototype; expected ‘double(double)’ [-Wbuiltin-declaration-mismatch]
  171 | double polevl(double, void *, int), floor(), ldexp();
      |                                                ^~~~~
/home/mrichters/Repos/Raze/source/common/thirdparty/math/exp.c:171:57: warning: declaration of built-in function ‘ldexp’ without a prototype; expected ‘double(double,  int)’ [-Wbuiltin-declaration-mismatch]
  171 | double polevl(double, void *, int), floor(), ldexp();

/home/mrichters/Repos/Raze/source/common/thirdparty/math/exp.c:200:16: warning: passing arguments to 'polevl' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
px = x * polevl( xx, P, 2 );
               ^
/home/mrichters/Repos/Raze/source/common/thirdparty/math/exp.c:201:17: warning: passing arguments to 'polevl' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
x =  px/( polevl( xx, Q, 3 ) - px );
                ^
/home/mrichters/Repos/Raze/source/common/thirdparty/math/exp.c:167:8: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
double c_exp(x)
       ^
3 warnings generated.
2023-10-05 10:32:44 +11:00
Christoph Oelckers
f671eb622f - migrated to GZDoom's utility code. 2020-04-12 08:30:39 +02:00