From 17769452d413996f70c3291ade0d256228d957cc Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Tue, 24 Apr 2018 16:58:50 +0200 Subject: [PATCH] nrf/modules/machine/adc: Don't compare -1 to an unsigned number. Clang warns about this. --- ports/nrf/modules/machine/adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/nrf/modules/machine/adc.c b/ports/nrf/modules/machine/adc.c index bbb5221540..d863aebb35 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,