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

@@ -457,7 +457,7 @@ STATIC mp_obj_t socket_settimeout(const mp_obj_t arg0, const mp_obj_t arg1) {
_socket_settimeout(self, UINT64_MAX);
} else {
#if MICROPY_PY_BUILTINS_FLOAT
_socket_settimeout(self, mp_obj_get_float(arg1) * 1000L);
_socket_settimeout(self, (uint64_t)(mp_obj_get_float(arg1) * MICROPY_FLOAT_CONST(1000.0)));
#else
_socket_settimeout(self, mp_obj_get_int(arg1) * 1000);
#endif