Skip to content
Snippets Groups Projects
Commit 942658a6 authored by rahix's avatar rahix
Browse files

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: default avatarRahix <rahix@rahix.de>
parent 1eef5c51
Branches
No related tags found
No related merge requests found
...@@ -16,6 +16,7 @@ lib = static_library( ...@@ -16,6 +16,7 @@ lib = static_library(
sources, sources,
include_directories: includes, include_directories: includes,
dependencies: [periphdriver, mx25lba], dependencies: [periphdriver, mx25lba],
c_args: '-w',
) )
libff13 = declare_dependency( libff13 = declare_dependency(
......
...@@ -7,6 +7,7 @@ project( ...@@ -7,6 +7,7 @@ project(
'c_std=c99', 'c_std=c99',
'b_staticpic=false', 'b_staticpic=false',
'b_asneeded=false', 'b_asneeded=false',
'warning_level=2',
], ],
) )
...@@ -17,6 +18,8 @@ assert( ...@@ -17,6 +18,8 @@ assert(
) )
add_global_arguments( add_global_arguments(
'-Wno-unused-parameter',
'-Wno-old-style-declaration',
meson.get_cross_property('target_defs'), meson.get_cross_property('target_defs'),
language: 'c', language: 'c',
) )
......
...@@ -80,6 +80,7 @@ upy = static_library( ...@@ -80,6 +80,7 @@ upy = static_library(
micropython_extmod_sources, micropython_extmod_sources,
mp_headers, mp_headers,
include_directories: micropython_includes, include_directories: micropython_includes,
c_args: '-w',
) )
elf = executable( elf = executable(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment