When compiling KPP on MacOSX with gcc 13, we get these warnings:
gcc -g -Wall -Wno-unused-function -I/usr/include -c code_f90.c
code_f90.c:319:5: warning: variable 'nlines' set but not used [-Wunused-but-set-variable]
int nlines;
^
1 warning generated.
gcc -g -Wall -Wno-unused-function -I/usr/include -c code_matlab.c
code_matlab.c:262:5: warning: variable 'nlines' set but not used [-Wunused-but-set-variable]
int nlines;
^
1 warning generated.
gcc -g -Wall -Wno-unused-function -I/usr/include -c debug.c
gcc -g -Wall -Wno-unused-function -I/usr/include -c gen.c
gen.c:3494:25: warning: passing arguments to 'Use_F' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
case F77_LANG: Use_F( rootFileName );
^
gen.c:3496:27: warning: passing arguments to 'Use_F90' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
case F90_LANG: Use_F90( rootFileName );
^
gen.c:3498:23: warning: passing arguments to 'Use_C' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
case C_LANG: Use_C( rootFileName );
^
gen.c:3500:33: warning: passing arguments to 'Use_MATLAB' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
case MATLAB_LANG: Use_MATLAB( rootFileName );
4 warnings generated.
gcc -g -Wall -Wno-unused-function -I/usr/include -c kpp.c
kpp.c:597:11: warning: passing arguments to 'Generate' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
Generate( rootFileName );
^
I suspect it has to do that we are passing rootFileName to various C routines but the function prototype for these routines do not have the rootFileName argument:
I think this is due to stricter parsing of the source code in GCC 13.
Version:
$ gcc --version
gcc-13 (Homebrew GCC 13.2.0) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
We could try adding rootFileName to the function prototypes and see if it clears the error.
Report a bug or issue with KPP:
When compiling KPP on MacOSX with gcc 13, we get these warnings:
I suspect it has to do that we are passing
rootFileName
to various C routines but the function prototype for these routines do not have therootFileName
argument:I think this is due to stricter parsing of the source code in GCC 13.
Version:
We could try adding
rootFileName
to the function prototypes and see if it clears the error.