meson: add all* CFLAGS from travis-autogen.sh

Add all the flags, apart from -Werror and -fdiagnostics-color=auto.

We don't want for the former in the default build, but for developer,
maintainer and/or CI builds ... Some patches adding CI, fixing the
warnings, etc will be coming later on.

The latter overrides the default color handling, so we cannot see them
pretty colo(u)rs ;-P

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
Emil Velikov 2024-09-18 21:08:47 +01:00
parent 2d9429eeb7
commit c738416051

View File

@ -17,16 +17,42 @@ cc = meson.get_compiler('c')
add_project_arguments(
cc.get_supported_arguments([
'-Wbad-function-cast',
# '-Wcast-align',
'-Wchar-subscripts',
# '-Wempty-body',
'-Wformat=2',
# '-Wformat',
# '-Wformat-nonliteral',
# '-Wformat-security',
# '-Wformat-y2k',
'-Winit-self',
'-Winline',
'-Wmissing-declarations',
'-Wmissing-include-dirs',
'-Wmissing-prototypes',
'-Wnested-externs',
'-Wold-style-definition',
'-Wpointer-arith',
'-Wredundant-decls',
'-Wshadow',
'-Wsign-compare',
'-Wstrict-prototypes',
'-Wswitch-enum',
'-Wtype-limits',
'-Wundef',
'-Wuninitialized',
'-Wunused',
'-Wunused-variable',
'-Wwrite-strings',
'-fdiagnostics-color=auto',
# warnings disabled on purpose
'-Wno-unused-parameter',
'-Wno-unused-function',
'-Wno-deprecated-declarations',
# should be removed and the code fixed
'-Wno-incompatible-pointer-types-discards-qualifiers',
'-Wno-missing-field-initializers',
]),
language: 'c',
)