diff --git a/meson.build b/meson.build index af7ed9f..c6375ad 100644 --- a/meson.build +++ b/meson.build @@ -7,10 +7,30 @@ project('libei', 'c', pkgconfig = import('pkgconfig') cc = meson.get_compiler('c') -cppflags = ['-Wno-unused-parameter'] -cflags = cppflags + ['-Wmissing-prototypes', '-Wstrict-prototypes'] -add_project_arguments(cflags, language: 'c') -add_project_arguments(cppflags, language: 'cpp') +cflags =[ + '-Wno-unused-parameter', + '-Wmissing-prototypes', + '-Wno-missing-field-initializers', + '-Wstrict-prototypes', + '-Wstrict-prototypes', + '-Wlogical-op', + '-Wpointer-arith', + '-Wuninitialized', + '-Winit-self', + '-Wstrict-prototypes', + '-Wimplicit-fallthrough', + '-Wredundant-decls', + '-Wincompatible-pointer-types', + '-Wformat=2', + '-Wformat-overflow=2', + '-Wformat-signedness', + '-Wformat-truncation=2', + '-Wmissing-declarations', + '-Wshift-overflow=2', + '-Wstrict-overflow=2', + '-Wswitch', +] +add_project_arguments(cc.get_supported_arguments(cflags), language: 'c') config_h = configuration_data() config_h.set('_GNU_SOURCE', '1')