From: Bruno Haible Date: Sat, 19 Aug 2023 23:44:26 +0000 (+0200) Subject: ldexpl: Avoid possible -Wshadow warning. X-Git-Tag: v1.0~884 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=669662a0434b8876e01fd2646eae269530cd63ef;p=gnulib.git ldexpl: Avoid possible -Wshadow warning. * lib/ldexpl.c (exp): Locally rename to 'exponent'. --- diff --git a/ChangeLog b/ChangeLog index c246e04dd9..79a4453361 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2023-08-19 Bruno Haible + ldexpl: Avoid possible -Wshadow warning. + * lib/ldexpl.c (exp): Locally rename to 'exponent'. + ldexpl: Fix signed integer overflow. * lib/ldexpl.c (ldexpl): Use an 'unsigned int' variable to represent the absolute value of exp without overflow. diff --git a/lib/ldexpl.c b/lib/ldexpl.c index 255917eb30..93a31cc033 100644 --- a/lib/ldexpl.c +++ b/lib/ldexpl.c @@ -23,6 +23,11 @@ /* Specification. */ #include +/* Avoid some warnings from "gcc -Wshadow". + This file doesn't use the exp() function. */ +#undef exp +#define exp exponent + #if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE long double