diff options
| author | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-02-14 10:55:54 +0100 |
|---|---|---|
| committer | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-02-14 10:55:54 +0100 |
| commit | 18c299b13dd568669176fb1c713c79dfb4890bbe (patch) | |
| tree | 32fdb41caa0e39479abdecee1c64784ce7145b48 /extmod | |
| parent | 9ed3e11aec6ed40a86fa846b9fe2fa76224d8c05 (diff) | |
Make mp_float_t conversions explicit to silence warnings of converting floats to doubles.
Diffstat (limited to 'extmod')
| -rw-r--r-- | extmod/moductypes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/moductypes.c b/extmod/moductypes.c index 6249a4940..44b36561f 100644 --- a/extmod/moductypes.c +++ b/extmod/moductypes.c @@ -338,7 +338,7 @@ 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]); #endif |
