fix compiler warning

This commit is contained in:
graham sanderson 2021-02-25 10:14:22 -06:00 committed by Graham Sanderson
parent 75422bbd68
commit 693311a74d

View File

@ -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 {