From 1112d77c3dc7a8ab7e8dc6e0193a7fbb95840fad Mon Sep 17 00:00:00 2001 From: David Gauchard Date: Thu, 5 Mar 2020 18:25:12 +0100 Subject: [PATCH] less warnings on featherM0 --- cores/arduino/math_helper.c | 6 ++++-- cores/arduino/wiring_analog.c | 2 +- libraries/SPI/SPI.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cores/arduino/math_helper.c b/cores/arduino/math_helper.c index da6d47b0..477d4616 100644 --- a/cores/arduino/math_helper.c +++ b/cores/arduino/math_helper.c @@ -164,7 +164,8 @@ void arm_float_to_q12_20(float *pIn, q31_t * pOut, uint32_t numSamples) uint32_t arm_compare_fixed_q15(q15_t *pIn, q15_t * pOut, uint32_t numSamples) { uint32_t i; - int32_t diff, diffCrnt = 0; + int32_t diff; + uint32_t diffCrnt; uint32_t maxDiff = 0; for (i = 0; i < numSamples; i++) @@ -192,7 +193,8 @@ uint32_t arm_compare_fixed_q15(q15_t *pIn, q15_t * pOut, uint32_t numSamples) uint32_t arm_compare_fixed_q31(q31_t *pIn, q31_t * pOut, uint32_t numSamples) { uint32_t i; - int32_t diff, diffCrnt = 0; + int32_t diff; + uint32_t diffCrnt; uint32_t maxDiff = 0; for (i = 0; i < numSamples; i++) diff --git a/cores/arduino/wiring_analog.c b/cores/arduino/wiring_analog.c index 13a0191b..f809c32a 100644 --- a/cores/arduino/wiring_analog.c +++ b/cores/arduino/wiring_analog.c @@ -32,7 +32,7 @@ static int _writeResolution = 12; static int _dacResolution = 12; #else static int _writeResolution = 8; -static int _dacResolution = 10; +//static int _dacResolution = 10; #endif diff --git a/libraries/SPI/SPI.h b/libraries/SPI/SPI.h index b87175ea..48c3cb7b 100644 --- a/libraries/SPI/SPI.h +++ b/libraries/SPI/SPI.h @@ -149,7 +149,7 @@ class SPIClass { #else // On SAMD21, this compiles to nothing, so user code doesn't need to // check and conditionally compile lines for different architectures. - void setClockSource(SercomClockSource clk) { }; + void setClockSource(__attribute__((unused)) SercomClockSource clk) { }; #endif // end __SAMD51__ private: