From: Peter Hutterer Date: Wed, 9 Sep 2020 01:53:12 +0000 (+1000) Subject: meson.build: add a few compiler warnings and make them compiler-conditional X-Git-Tag: 1.16.901~88 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f86d6a6e5a536d7f019b4964b17c4198237b584e;p=platform%2Fupstream%2Flibinput.git 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 --- diff --git a/meson.build b/meson.build index 963c25b8..24837d28 100644 --- a/meson.build +++ b/meson.build @@ -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()