From 12889f85302c4bc655cbc5e362cefbcdc623b4f7 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Wed, 1 Nov 2023 09:44:02 -0400 Subject: [PATCH] avoid shadowing with build-in function --- os/hal/lib/streams/chprintf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/os/hal/lib/streams/chprintf.c b/os/hal/lib/streams/chprintf.c index 776fc5859..2ecf41836 100644 --- a/os/hal/lib/streams/chprintf.c +++ b/os/hal/lib/streams/chprintf.c @@ -76,7 +76,7 @@ static char *ch_ltoa(char *p, long num, unsigned radix) { } #if CHPRINTF_USE_FLOAT -static const long pow10[FLOAT_PRECISION] = { +static const long chPow10[FLOAT_PRECISION] = { 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000 }; @@ -98,7 +98,7 @@ static char *ftoa(char *p, float num, unsigned long precision) { if ((precision == 0) || (precision > FLOAT_PRECISION)) { precision = FLOAT_PRECISION; } - precision = pow10[precision - 1]; + precision = chPow10[precision - 1]; l = (long)num; p = long_to_string_with_divisor(p, l, 10, 0);