mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 19:20:22 +01:00
all: Fix implicit floating point to integer conversions.
These are found when building with -Wfloat-conversion.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user