Rename parameter 'exp' to 'expptr', to avoid gcc warnings.
authorBruno Haible <bruno@clisp.org>
Sun, 7 Oct 2007 20:10:35 +0000 (22:10 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 7 Oct 2007 20:10:35 +0000 (22:10 +0200)
ChangeLog
lib/frexp.c
lib/math.in.h
lib/printf-frexp.c
lib/printf-frexp.h
lib/printf-frexpl.h

index 275e2ed5e2ee163c68fe002a2d547f1b9fa8bdf9..4bff879c4adce1d9cddbc848ffc47db7800214ce 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2007-10-07  Bruno Haible  <bruno@clisp.org>
+
+       Avoid gcc warnings "declaration of 'exp' shadows a global declaration".
+       * lib/math.in.h (frexp, frexpl): Change parameter name to 'expptr'.
+       * lib/frexp.c (FUNC): Likewise.
+       * lib/printf-frexp.h (printf_frexp): Likewise.
+       * lib/printf-frexpl.h (printf_frexpl): Likewise.
+       * lib/printf-frexp.c (FUNC): Likewise.
+       Suggested by Jim Meyering.
+
 2007-10-07  Jim Meyering  <meyering@redhat.com>
 
        Make xnanosleep's integer overflow test more robust.
index 823a0453db958db81fd9227764fdf898bae7baa5..ed4da88626adb35161249060a516ed0184fa58b5 100644 (file)
@@ -53,7 +53,7 @@
 #endif
 
 DOUBLE
-FUNC (DOUBLE x, int *exp)
+FUNC (DOUBLE x, int *expptr)
 {
   int sign;
   int exponent;
@@ -62,7 +62,7 @@ FUNC (DOUBLE x, int *exp)
   /* Test for NaN, infinity, and zero.  */
   if (ISNAN (x) || x + x == x)
     {
-      *exp = 0;
+      *expptr = 0;
       return x;
     }
 
@@ -161,6 +161,6 @@ FUNC (DOUBLE x, int *exp)
 
   END_ROUNDING ();
 
-  *exp = exponent;
+  *expptr = exponent;
   return x;
 }
index 2a3e97202761f4a1776ed857eacf6fecb71dac35..93eeb9327e5d90280cedede5463241cca370d4a8 100644 (file)
@@ -38,11 +38,11 @@ extern "C" {
      If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
      If x is zero: mantissa = x, exp = 0.
      If x is infinite or NaN: mantissa = x, exp unspecified.
-   Store exp and return mantissa.  */
+   Store exp in *EXPPTR and return mantissa.  */
 #if @GNULIB_FREXP@
 # if @REPLACE_FREXP@
 #  define frexp rpl_frexp
-extern double frexp (double x, int *exp);
+extern double frexp (double x, int *expptr);
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef frexp
@@ -173,12 +173,12 @@ extern long double floorl (long double x);
      If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
      If x is zero: mantissa = x, exp = 0.
      If x is infinite or NaN: mantissa = x, exp unspecified.
-   Store exp and return mantissa.  */
+   Store exp in *EXPPTR and return mantissa.  */
 #if @GNULIB_FREXPL@ && @REPLACE_FREXPL@
 # define frexpl rpl_frexpl
 #endif
 #if (@GNULIB_FREXPL@ && @REPLACE_FREXPL@) || !@HAVE_DECL_FREXPL@
-extern long double frexpl (long double x, int *exp);
+extern long double frexpl (long double x, int *expptr);
 #endif
 #if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK
 # undef frexpl
index 5aabf2038102773e4399ddbfbea268c4d66be5c5..da5c9c3a458084e9d09e5cde553cba77968d7c3e 100644 (file)
@@ -62,7 +62,7 @@
 #endif
 
 DOUBLE
-FUNC (DOUBLE x, int *exp)
+FUNC (DOUBLE x, int *expptr)
 {
   int exponent;
   DECL_ROUNDING
@@ -183,6 +183,6 @@ FUNC (DOUBLE x, int *exp)
 
   END_ROUNDING ();
 
-  *exp = exponent;
+  *expptr = exponent;
   return x;
 }
index 5c0f0ccbe0139c3ee945dc89cf291c2b37599f95..46c32765dddec7e8213150b135b66e614fbc0e56 100644 (file)
@@ -19,5 +19,5 @@
    where exp >= DBL_MIN_EXP - 1,
          mantissa < 2.0,
          if x is not a denormalized number then mantissa >= 1.0.
-   Store exp and return mantissa.  */
-extern double printf_frexp (double x, int *exp);
+   Store exp in *EXPPTR and return mantissa.  */
+extern double printf_frexp (double x, int *expptr);
index 86ff7ec67be12c74afe93df716c32b99494e57e3..6c2d214b6d6953620507c183b2f5e3d33acf1bd1 100644 (file)
@@ -19,5 +19,5 @@
    where exp >= LDBL_MIN_EXP - 1,
          mantissa < 2.0,
          if x is not a denormalized number then mantissa >= 1.0.
-   Store exp and return mantissa.  */
-extern long double printf_frexpl (long double x, int *exp);
+   Store exp in *EXPPTR and return mantissa.  */
+extern long double printf_frexpl (long double x, int *expptr);