mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 04:00:28 +01:00
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.
This commit is contained in:
committed by
Damien George
parent
3a0f64fc7a
commit
a2110bd3fc
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user