all: Fix implicit floating point to integer conversions.

These are found when building with -Wfloat-conversion.
This commit is contained in:
stijn
2020-04-13 20:56:31 +02:00
committed by Damien George
parent bcf01d1686
commit 70affd9ba2
14 changed files with 25 additions and 23 deletions

View File

@@ -419,10 +419,10 @@ void mp_binary_set_val_array_from_int(char typecode, void *p, size_t index, mp_i
#endif
#if MICROPY_PY_BUILTINS_FLOAT
case 'f':
((float *)p)[index] = val;
((float *)p)[index] = (float)val;
break;
case 'd':
((double *)p)[index] = val;
((double *)p)[index] = (double)val;
break;
#endif
// Extension to CPython: array of pointers