From bcf01d1686a8fa6d257daea25ce0d7df6e4ad839 Mon Sep 17 00:00:00 2001 From: stijn Date: Tue, 31 Mar 2020 14:48:08 +0200 Subject: all: Fix implicit conversion from double to float. These are found when building with -Wfloat-conversion. --- extmod/moductypes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extmod') diff --git a/extmod/moductypes.c b/extmod/moductypes.c index cdbf49ad4..e12b05f96 100644 --- a/extmod/moductypes.c +++ b/extmod/moductypes.c @@ -362,7 +362,7 @@ STATIC mp_obj_t get_aligned(uint val_type, void *p, mp_int_t index) { case FLOAT32: return mp_obj_new_float_from_f(((float *)p)[index]); case FLOAT64: - return mp_obj_new_float(((double *)p)[index]); + return mp_obj_new_float_from_d(((double *)p)[index]); #endif default: assert(0); -- cgit v1.2.3