Skip to content

Commit 644b1f4

Browse files
Fix two signedness warnings
This helps towards arduino#1792
1 parent a13a0dd commit 644b1f4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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
}

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)