From ef47bbfbae575f56d743ed0831a1901fa9d9224b Mon Sep 17 00:00:00 2001 From: James Foster Date: Sun, 4 Apr 2021 13:37:46 -0700 Subject: [PATCH] Fix problem with warnings for platforms. --- CHANGELOG.md | 1 + SampleProjects/TestSomething/.arduino-ci.yml | 15 +++++++++++++++ lib/arduino_ci/cpp_library.rb | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0cac76ad..3f83ce96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Added ### Changed +- Fix copy/paste error to allow additional warnings for a platform ### Deprecated diff --git a/SampleProjects/TestSomething/.arduino-ci.yml b/SampleProjects/TestSomething/.arduino-ci.yml index f9890177..109fa0f3 100644 --- a/SampleProjects/TestSomething/.arduino-ci.yml +++ b/SampleProjects/TestSomething/.arduino-ci.yml @@ -1,3 +1,18 @@ +platforms: + uno: + board: arduino:avr:uno + package: arduino:avr + gcc: + features: + defines: + - __AVR__ + - __AVR_ATmega328P__ + - ARDUINO_ARCH_AVR + - ARDUINO_AVR_UNO + warnings: + - no-unknown-attributes + flags: + unittest: platforms: - uno diff --git a/lib/arduino_ci/cpp_library.rb b/lib/arduino_ci/cpp_library.rb index 4ad7307f..f3e4a7a4 100644 --- a/lib/arduino_ci/cpp_library.rb +++ b/lib/arduino_ci/cpp_library.rb @@ -443,7 +443,7 @@ def feature_args(ci_gcc_config) def warning_args(ci_gcc_config) return [] if ci_gcc_config[:warnings].nil? - ci_gcc_config[:features].map { |w| "-W#{w}" } + ci_gcc_config[:warnings].map { |w| "-W#{w}" } end # GCC command line arguments for defines (e.g. -Dhave_something)