summaryrefslogtreecommitdiff
path: root/extmod
diff options
context:
space:
mode:
authorScott Shawcroft <scott.shawcroft@gmail.com>2017-02-14 10:55:54 +0100
committerScott Shawcroft <scott.shawcroft@gmail.com>2017-02-14 10:55:54 +0100
commit18c299b13dd568669176fb1c713c79dfb4890bbe (patch)
tree32fdb41caa0e39479abdecee1c64784ce7145b48 /extmod
parent9ed3e11aec6ed40a86fa846b9fe2fa76224d8c05 (diff)
Make mp_float_t conversions explicit to silence warnings of converting floats to doubles.
Diffstat (limited to 'extmod')
-rw-r--r--extmod/moductypes.c2
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