Anastasia Klimchuk submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Thomas Heijligen: Looks good to me, approved Peter Marheine: Looks good to me, but someone else must approve
meson: Treat warnings as errors

Makefile treats warnings as errors, so enable the same option
for meson.

Makefile has an option to disable "warnings as errors" option
from command line. The same can be achieved with meson, see
scenario 2 below.

TEST=I verified the following scenarious

1) check that warnings treated as errors by enforcing higher
warning level
`meson setup --warnlevel=3 --wipe`
`ninja test`
shows tons of errors because warning level 3 is pedantic,
build fails

2) disable "warning as errors" option from command line
`meson configure -Dwerror=false`
`ninja test`
Now all warnings are non-blocking for build, so tests pass

3) back home
`meson configure -Dwerror=true`
`meson setup --warnlevel=2 --wipe`
`ninja test`
No warnings and tests pass

4) defaults: create new directory and run meson will all default
options
No warnings, all tests pass.

Change-Id: I06c72abf1c861f9b35736e02ef7f4a4fb6909b97
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/63852
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Thomas Heijligen <src@posteo.de>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
---
M meson.build
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/meson.build b/meson.build
index 80ccfb3..222f7c1 100644
--- a/meson.build
+++ b/meson.build
@@ -5,6 +5,7 @@
default_options : [
'warning_level=2',
'c_std=c99',
+ 'werror=true',
'optimization=s',
'debug=false'],
)

1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one.

To view, visit change 63852. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I06c72abf1c861f9b35736e02ef7f4a4fb6909b97
Gerrit-Change-Number: 63852
Gerrit-PatchSet: 4
Gerrit-Owner: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Peter Marheine <pmarheine@chromium.org>
Gerrit-Reviewer: Thomas Heijligen <src@posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus@gmail.com>
Gerrit-CC: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-CC: Felix Singer <felixsinger@posteo.net>
Gerrit-CC: Nico Huber <nico.h@gmx.de>
Gerrit-MessageType: merged