meson.build: add a few compiler warnings and make them compiler-conditional

These seem like a decent-enough set to have, only -Wlogical-op actually
produced a new warning.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2020-09-09 11:53:12 +10:00
parent 7ad976984e
commit f86d6a6e5a

View file

@ -45,11 +45,22 @@ cc = meson.get_compiler('c')
cflags = [
'-Wno-unused-parameter',
'-Wmissing-prototypes',
'-Wstrict-prototypes'
'-Wstrict-prototypes',
'-Wundef',
'-Wlogical-op',
'-Wpointer-arith',
'-Wuninitialized',
'-Winit-self',
'-Wstrict-prototypes',
'-Wimplicit-fallthrough',
'-Wredundant-decls',
'-Wincompatible-pointer-types',
'-Wformat=2',
'-Wmissing-declarations',
'-fvisibility=hidden',
]
add_project_arguments(cflags, language : 'c')
add_project_arguments(cc.get_supported_arguments(cflags), language : 'c')
# config.h
config_h = configuration_data()