diff options
| author | Ayke van Laethem <aykevanlaethem@gmail.com> | 2018-04-24 16:58:50 +0200 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2018-07-18 17:12:26 +1000 |
| commit | 17769452d413996f70c3291ade0d256228d957cc (patch) | |
| tree | 67de9e4cbc85e733744312b22abfecaab9c11cc6 | |
| parent | 4111206bd51695486d3ac6bb5bc6a2ade61aebd3 (diff) | |
nrf/modules/machine/adc: Don't compare -1 to an unsigned number.
Clang warns about this.
| -rw-r--r-- | ports/nrf/modules/machine/adc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/nrf/modules/machine/adc.c b/ports/nrf/modules/machine/adc.c index bbb522154..d863aebb3 100644 --- a/ports/nrf/modules/machine/adc.c +++ b/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, |
