From e75c1e1873165e269c78d624d194fd165756837d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 18 Jul 2020 11:57:30 +0200 Subject: Be explicit about warnings --- waflib | 2 +- wscript | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 1 deletion(-) diff --git a/waflib b/waflib index f0bc333..116a28f 160000 --- a/waflib +++ b/waflib @@ -1 +1 @@ -Subproject commit f0bc33348b833b26697df5ba8cd1f9bf5dd9b3c4 +Subproject commit 116a28fa5f92e58a46dc878751019ba74a61e54a diff --git a/wscript b/wscript index 37487e9..0dbe81b 100644 --- a/wscript +++ b/wscript @@ -41,6 +41,77 @@ def configure(conf): conf.load('autowaf', cache=True) autowaf.set_c_lang(conf, 'c99') + if Options.options.ultra_strict: + autowaf.add_compiler_flags(conf.env, 'c', { + 'clang': [ + '-Wno-bad-function-cast', + ], + 'gcc': [ + '-Wno-bad-function-cast', + ] + }) + + autowaf.add_compiler_flags(conf.env, 'cxx', { + 'clang': [ + '-Wno-exit-time-destructors', + '-Wno-global-constructors', + '-Wno-missing-noreturn', + '-Wno-old-style-cast', + '-Wno-weak-vtables', + '-Wno-zero-as-null-pointer-constant', + ], + 'gcc': [ + '-Wno-effc++', + '-Wno-missing-noreturn', + '-Wno-old-style-cast', + '-Wno-suggest-override', + '-Wno-useless-cast', + '-Wno-zero-as-null-pointer-constant', + ] + }) + + autowaf.add_compiler_flags(conf.env, '*', { + 'clang': [ + '-Wno-cast-qual', + '-Wno-covered-switch-default', + '-Wno-disabled-macro-expansion', + '-Wno-documentation-unknown-command', + '-Wno-double-promotion', + '-Wno-float-conversion', + '-Wno-float-equal', + '-Wno-implicit-fallthrough', + '-Wno-implicit-float-conversion', + '-Wno-implicit-int-float-conversion', + '-Wno-padded', + '-Wno-reserved-id-macro', + '-Wno-shadow', + '-Wno-shorten-64-to-32', + '-Wno-sign-conversion', + '-Wno-switch-enum', + '-Wno-unused-macros', + '-Wno-unused-parameter', + '-Wno-used-but-marked-unused', + ], + 'gcc': [ + '-Wno-cast-function-type', + '-Wno-cast-qual', + '-Wno-conversion', + '-Wno-deprecated-declarations', + '-Wno-double-promotion', + '-Wno-float-conversion', + '-Wno-float-equal', + '-Wno-format', + '-Wno-implicit-fallthrough', + '-Wno-padded', + '-Wno-pedantic', + '-Wno-shadow', + '-Wno-sign-conversion', + '-Wno-switch-enum', + '-Wno-unused-macros', + '-Wno-unused-parameter', + ], + }) + conf.check_pkg('gtk+-2.0', uselib_store='GTK', system=True) conf.check_pkg('gtkmm-2.4 >= 2.10.0', uselib_store='GTKMM', system=True) @@ -70,6 +141,8 @@ def configure(conf): header_name = 'libintl.h', lib = 'intl', define_name = 'ENABLE_NLS', + return_type = 'char*', + arg_types = 'const char*,const char*', mandatory = False) autowaf.set_lib_env(conf, 'ganv', GANV_VERSION) -- cgit v1.2.1