nrf/modules/machine/adc: Don't compare -1 to an unsigned number.
Clang warns about this.
This commit is contained in:
parent
4111206bd5
commit
17769452d4
@ -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…
Reference in New Issue
Block a user