From 4b3db72a4685f42e147775496c119ac45d62185f Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Tue, 18 Feb 2014 21:04:06 +0100 Subject: [PATCH] Fix two signedness warnings This helps towards #1792 --- hardware/arduino/sam/cores/arduino/wiring_analog.c | 2 +- hardware/arduino/sam/variants/arduino_due_x/variant.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hardware/arduino/sam/cores/arduino/wiring_analog.c b/hardware/arduino/sam/cores/arduino/wiring_analog.c index ffdc4e2f0..2afa0c9e7 100644 --- a/hardware/arduino/sam/cores/arduino/wiring_analog.c +++ b/hardware/arduino/sam/cores/arduino/wiring_analog.c @@ -150,7 +150,7 @@ uint32_t analogRead(uint32_t ulPin) // Enable the corresponding channel if (ulChannel != latestSelectedChannel) { adc_enable_channel( ADC, ulChannel ); - if ( latestSelectedChannel != -1 ) + if ( latestSelectedChannel != (uint32_t)-1 ) adc_disable_channel( ADC, latestSelectedChannel ); latestSelectedChannel = ulChannel; } diff --git a/hardware/arduino/sam/variants/arduino_due_x/variant.cpp b/hardware/arduino/sam/variants/arduino_due_x/variant.cpp index ab43675ab..ac066898d 100644 --- a/hardware/arduino/sam/variants/arduino_due_x/variant.cpp +++ b/hardware/arduino/sam/variants/arduino_due_x/variant.cpp @@ -380,7 +380,7 @@ void init( void ) __libc_init_array(); // Disable pull-up on every pin - for (int i = 0; i < PINS_COUNT; i++) + for (unsigned i = 0; i < PINS_COUNT; i++) digitalWrite(i, LOW); // Enable parallel access on PIO output data registers