summaryrefslogtreecommitdiff
path: root/py/mpprint.c
diff options
context:
space:
mode:
authorstijn <stijn@ignitron.net>2020-03-31 14:48:08 +0200
committerDamien George <damien.p.george@gmail.com>2020-04-18 22:42:24 +1000
commitbcf01d1686a8fa6d257daea25ce0d7df6e4ad839 (patch)
tree2513c71e685ead21c6ca44a0432500ca75c424f8 /py/mpprint.c
parentdc4d119d3d96799bf848c6488b2ac49b933ab7cb (diff)
all: Fix implicit conversion from double to float.
These are found when building with -Wfloat-conversion.
Diffstat (limited to 'py/mpprint.c')
-rw-r--r--py/mpprint.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/mpprint.c b/py/mpprint.c
index 49653a05b..c550c1d95 100644
--- a/py/mpprint.c
+++ b/py/mpprint.c
@@ -542,7 +542,7 @@ int mp_vprintf(const mp_print_t *print, const char *fmt, va_list args) {
case 'g':
case 'G': {
#if ((MICROPY_FLOAT_IMPL == MICROPY_FLOAT_IMPL_FLOAT) || (MICROPY_FLOAT_IMPL == MICROPY_FLOAT_IMPL_DOUBLE))
- mp_float_t f = va_arg(args, double);
+ mp_float_t f = (mp_float_t)va_arg(args, double);
chrs += mp_print_float(print, f, *fmt, flags, fill, width, prec);
#else
#error Unknown MICROPY FLOAT IMPL