Browse Source

nrf/modules/machine/adc: Don't compare -1 to an unsigned number.

Clang warns about this.
pull/3137/merge
Ayke van Laethem 7 years ago
committed by Damien George
parent
commit
17769452d4
  1. 2
      ports/nrf/modules/machine/adc.c

2
ports/nrf/modules/machine/adc.c

@ -97,7 +97,7 @@ STATIC int adc_find(mp_obj_t id) {
int adc_idx = adc_id;
if (adc_idx >= 0 && adc_idx <= MP_ARRAY_SIZE(machine_adc_obj)
&& machine_adc_obj[adc_idx].id != -1) {
&& machine_adc_obj[adc_idx].id != (uint8_t)-1) {
return adc_idx;
}
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError,

Loading…
Cancel
Save