Skip to content

Commit 4b3db72

Browse files
Fix two signedness warnings
This helps towards #1792
1 parent 1c6a57e commit 4b3db72

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: hardware/arduino/sam/cores/arduino/wiring_analog.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ uint32_t analogRead(uint32_t ulPin)
150150
// Enable the corresponding channel
151151
if (ulChannel != latestSelectedChannel) {
152152
adc_enable_channel( ADC, ulChannel );
153-
if ( latestSelectedChannel != -1 )
153+
if ( latestSelectedChannel != (uint32_t)-1 )
154154
adc_disable_channel( ADC, latestSelectedChannel );
155155
latestSelectedChannel = ulChannel;
156156
}

Diff for: hardware/arduino/sam/variants/arduino_due_x/variant.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ void init( void )
380380
__libc_init_array();
381381

382382
// Disable pull-up on every pin
383-
for (int i = 0; i < PINS_COUNT; i++)
383+
for (unsigned i = 0; i < PINS_COUNT; i++)
384384
digitalWrite(i, LOW);
385385

386386
// Enable parallel access on PIO output data registers

0 commit comments

Comments
 (0)