From 942658a660a53748e3162e9dbf84eae4f8eb98d0 Mon Sep 17 00:00:00 2001 From: Rahix <rahix@rahix.de> Date: Fri, 22 Nov 2019 16:28:26 +0100 Subject: [PATCH] build: Increase warning level to 2 As discussed in card10/firmware!357, we should increase the number of enabled compiler warnings to catch a lot more silent bugs. Increase the meson-global warning level to 2, but excluding the `unused-parameter` and `old-style-declaration` warnings. Additionally, disable warnings for libraries as we cannot fix that code anyway. Signed-off-by: Rahix <rahix@rahix.de> --- lib/ff13/meson.build | 1 + meson.build | 3 +++ pycardium/meson.build | 1 + 3 files changed, 5 insertions(+) diff --git a/lib/ff13/meson.build b/lib/ff13/meson.build index 6336bf28..fe2b3dc8 100644 --- a/lib/ff13/meson.build +++ b/lib/ff13/meson.build @@ -16,6 +16,7 @@ lib = static_library( sources, include_directories: includes, dependencies: [periphdriver, mx25lba], + c_args: '-w', ) libff13 = declare_dependency( diff --git a/meson.build b/meson.build index f1586ec9..8a0ae60b 100644 --- a/meson.build +++ b/meson.build @@ -7,6 +7,7 @@ project( 'c_std=c99', 'b_staticpic=false', 'b_asneeded=false', + 'warning_level=2', ], ) @@ -17,6 +18,8 @@ assert( ) add_global_arguments( + '-Wno-unused-parameter', + '-Wno-old-style-declaration', meson.get_cross_property('target_defs'), language: 'c', ) diff --git a/pycardium/meson.build b/pycardium/meson.build index e50b61df..aa637280 100644 --- a/pycardium/meson.build +++ b/pycardium/meson.build @@ -80,6 +80,7 @@ upy = static_library( micropython_extmod_sources, mp_headers, include_directories: micropython_includes, + c_args: '-w', ) elf = executable( -- GitLab