py, unix: Allow to compile with -Wdouble-promotion.
Ref issue #699.
diff --git a/py/objstr.c b/py/objstr.c
index 01ed3a2..879d185 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -1206,7 +1206,13 @@
case '%':
flags |= PF_FLAG_ADD_PERCENT;
- pfenv_print_float(&pfenv_vstr, mp_obj_get_float(arg) * 100.0F, 'f', flags, fill, width, precision);
+ #if MICROPY_FLOAT_IMPL == MICROPY_FLOAT_IMPL_FLOAT
+ #define F100 100.0F
+ #else
+ #define F100 100.0
+ #endif
+ pfenv_print_float(&pfenv_vstr, mp_obj_get_float(arg) * F100, 'f', flags, fill, width, precision);
+ #undef F100
break;
#endif