]> Savannah Git Hosting - gnulib.git/commitdiff
ldexpl: Avoid possible -Wshadow warning.
authorBruno Haible <bruno@clisp.org>
Sat, 19 Aug 2023 23:44:26 +0000 (01:44 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 19 Aug 2023 23:52:56 +0000 (01:52 +0200)
* lib/ldexpl.c (exp): Locally rename to 'exponent'.

ChangeLog
lib/ldexpl.c

index c246e04dd998444b7a290f97a58cda568204f70c..79a44533614bdb88d90a9e8a1e2a1f491ec9ae00 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2023-08-19  Bruno Haible  <bruno@clisp.org>
 
+       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.
index 255917eb30a3e9e56498e6db144687c90dacae06..93a31cc033a1e8e969efef3985d6fe27caede3cd 100644 (file)
 /* Specification.  */
 #include <math.h>
 
+/* 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