From 70affd9ba22e7f62666a9a2fafc2a3c0be9ef95a Mon Sep 17 00:00:00 2001 From: stijn Date: Mon, 13 Apr 2020 20:56:31 +0200 Subject: all: Fix implicit floating point to integer conversions. These are found when building with -Wfloat-conversion. --- extmod/modlwip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extmod') 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 -- cgit v1.2.3