diff options
author | stijn <stijn@ignitron.net> | 2020-04-13 20:56:31 +0200 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2020-04-18 22:42:24 +1000 |
commit | 70affd9ba22e7f62666a9a2fafc2a3c0be9ef95a (patch) | |
tree | 068485d00339bf0b89a5b8ea328396ffa21a0b14 /extmod/modlwip.c | |
parent | bcf01d1686a8fa6d257daea25ce0d7df6e4ad839 (diff) |
all: Fix implicit floating point to integer conversions.
These are found when building with -Wfloat-conversion.
Diffstat (limited to 'extmod/modlwip.c')
-rw-r--r-- | extmod/modlwip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/modlwip.c b/extmod/modlwip.c index 9fbd783b2..216e81749 100644 --- a/extmod/modlwip.c +++ b/extmod/modlwip.c @@ -1316,7 +1316,7 @@ STATIC mp_obj_t lwip_socket_settimeout(mp_obj_t self_in, mp_obj_t timeout_in) { timeout = -1; } else { #if MICROPY_PY_BUILTINS_FLOAT - timeout = 1000 * mp_obj_get_float(timeout_in); + timeout = (mp_uint_t)(MICROPY_FLOAT_CONST(1000.0) * mp_obj_get_float(timeout_in)); #else timeout = 1000 * mp_obj_get_int(timeout_in); #endif |