From 693311a74d20e76d3f641a7b86e3dde87eaca919 Mon Sep 17 00:00:00 2001 From: graham sanderson Date: Thu, 25 Feb 2021 10:14:22 -0600 Subject: [PATCH] fix compiler warning --- src/rp2_common/pico_printf/printf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/rp2_common/pico_printf/printf.c b/src/rp2_common/pico_printf/printf.c index 69655e9..b8f3cb1 100644 --- a/src/rp2_common/pico_printf/printf.c +++ b/src/rp2_common/pico_printf/printf.c @@ -510,7 +510,6 @@ static size_t _etoa(out_fct_type out, char *buffer, size_t idx, size_t maxlen, d } } else { expval = 0; - conv.F = 1; } // the exponent format is "%+03d" and largest value is "307", so set aside 4-5 characters @@ -519,7 +518,7 @@ static size_t _etoa(out_fct_type out, char *buffer, size_t idx, size_t maxlen, d // in "%g" mode, "prec" is the number of *significant figures* not decimals if (flags & FLAGS_ADAPT_EXP) { // do we want to fall-back to "%f" mode? - if ((value == 0.0) || ((value >= 1e-4) && (value < 1e6))) { + if ((conv.U == 0) || ((value >= 1e-4) && (value < 1e6))) { if ((int) prec > expval) { prec = (unsigned) ((int) prec - expval - 1); } else {