diff options
| author | David Lechner | 2020-03-20 00:10:22 -0500 |
|---|---|---|
| committer | Damien George | 2020-03-30 12:04:21 +1100 |
| commit | a2110bd3fca59df8b16a2b5fe4645a4af30b06ed (patch) | |
| tree | 6020938ca1fa3f9034ccef522e106c5e9255b49a /extmod/moductypes.c | |
| parent | 3a0f64fc7aafe9fa39f518aec389ef5f55b40007 (diff) | |
all: Fix implicit casts of float/double, and signed comparison.
These were found by buiding the unix coverage variant on macOS (so clang
compiler). Mostly, these are fixing implicit cast of float/double to
mp_float_t which is one of those two and one mp_int_t to size_t fix for
good measure.
Diffstat (limited to 'extmod/moductypes.c')
| -rw-r--r-- | extmod/moductypes.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/extmod/moductypes.c b/extmod/moductypes.c index 5446f7b8f..c846747d5 100644 --- a/extmod/moductypes.c +++ b/extmod/moductypes.c @@ -360,9 +360,9 @@ STATIC mp_obj_t get_aligned(uint val_type, void *p, mp_int_t index) { return mp_obj_new_int_from_ll(((int64_t *)p)[index]); #if MICROPY_PY_BUILTINS_FLOAT case FLOAT32: - return mp_obj_new_float(((float *)p)[index]); + return mp_obj_new_float((mp_float_t)((float *)p)[index]); case FLOAT64: - return mp_obj_new_float(((double *)p)[index]); + return mp_obj_new_float((mp_float_t)((double *)p)[index]); #endif default: assert(0); |
