code-saturne / code_saturne

code_saturne public mirror
https://www.code-saturne.org
GNU General Public License v2.0
215 stars 80 forks source link

Problematic flags for the Clang compiler cause errors from warnings #106

Open paspro opened 1 year ago

paspro commented 1 year ago

For the Clang compiler to work properly (at least the latest version), one needs to modify file cs_auto_flags.sh, line 400 which reads:

cflags_default="-funsigned-char -Wall -Wshadow -Wpointer-arith -Wmissing-prototypes -Wuninitialized -Wunused"

and change it to:

cflags_default="-funsigned-char -Wall -Wshadow -Wpointer-arith -Wmissing-prototypes -Wuninitialized -Wunused -Wno-incompatible-function-pointer-types -Wno-implicit-int"

in order to avoid warnings of "incompatible function pointer types" and "implicit integer" to be marked as errors. Otherwise, one should update the source code to fix these warnings.

YvanFournier commented 1 year ago

Hello,

I can't reproduce this with Clang 11. I'll try on another machine with Clang 15 (I prefer updating the source code to changing the warnings).

Note: the automatic commit reference actually references the previous issue. Sorry for the typo.