ARMmbed / connectedhomeip

Project Connected Home over IP is a new Working Group within the Zigbee Alliance. This Working Group plans to develop and promote the adoption of a new connectivity standard to increase compatibility among smart home products, with security as a fundamental design tenet.
https://www.connectedhomeip.com
Apache License 2.0
10 stars 4 forks source link

Fix too many warnings in Mbed variant of CHIP build #91

Closed lukgni closed 3 years ago

lukgni commented 3 years ago

Problem

Too many warnings are present in Mbed variant of CHIP build.

Summary of Changes

Add chip_custom_cflags_config and chip_custom_build_cflags argument to mbed-chip gn config files. By adding compiler flags to chip_custom_build_cflags user can overwrite default warnings configuration and can for example disable -Wshadow option. This change doesn't modify main chip gn configuration and is only limited to mbed platform gn config.

Add condition for adding '-Wno-unknown-warning-option' flag only if the clang compiler is used. GCC does not support that flag and it will only complain about it if there are other errors/warnings in the file.

Mbed project and CHIP still use separated set of compiler flags.

New build output log can be reviewed by looking into: https://github.com/ARMmbed/connectedhomeip/runs/2027358055?check_suite_focus=true https://github.com/ARMmbed/connectedhomeip/runs/2027358024?check_suite_focus=true

Fixes #56

lukgni commented 3 years ago

It looks like there were some upstream changes in docker images used by nRF and EFR32 platforms. As long as we pulling the 'latest' image from docker.hub there is still risk of of problems like that.

pan- commented 3 years ago

I'm merging this, output is quite clean. We may revisit in the future if there is more issues.