Use GCC static analysis when available

This commit is contained in:
Richard Hughes 2022-01-13 19:20:50 +00:00
parent fc4687f3e5
commit 1e8b46321b

View File

@ -108,6 +108,9 @@ warning_flags = [
'-Wvla', '-Wvla',
'-Wwrite-strings' '-Wwrite-strings'
] ]
if host_machine.system() != 'windows'
warning_flags += ['-fanalyzer', '-Wno-analyzer-null-dereference']
endif
cc = meson.get_compiler('c') cc = meson.get_compiler('c')
add_project_arguments(cc.get_supported_arguments(warning_flags), language : 'c') add_project_arguments(cc.get_supported_arguments(warning_flags), language : 'c')