From a23b94ff61f9a4b0949e5cd10ef23dd9b190aa75 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 20 Aug 2023 01:44:26 +0200 Subject: [PATCH] ldexpl: Avoid possible -Wshadow warning. * lib/ldexpl.c (exp): Locally rename to 'exponent'. --- ChangeLog | 3 +++ lib/ldexpl.c | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8ad2f8e5eb..f3535cc7d8 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 51aed6f6d4..0cd7673d0b 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 -- 2.39.5