avoid another warning from gcc
authorJim Meyering <meyering@redhat.com>
Wed, 21 May 2008 21:09:59 +0000 (23:09 +0200)
committerJim Meyering <meyering@redhat.com>
Wed, 21 May 2008 21:11:04 +0000 (23:11 +0200)
* lib/vasnprintf.c (scale10_round_decimal_double):
Use IF_LINT to avoid another "may be used uninitialized" warning.

ChangeLog
lib/vasnprintf.c

index c1bd3f2..f96815a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
        * lib/vasnprintf.c (IF_LINT): Define.
        (scale10_round_decimal_long_double):
        Use it to avoid a "may be used uninitialized" warning.
+       (scale10_round_decimal_double): Likewise.
 
 2008-05-21  Simon Josefsson  <simon@josefsson.org>
 
index 9018c60..ec35109 100644 (file)
@@ -1230,7 +1230,7 @@ scale10_round_decimal_long_double (long double x, int n)
 static char *
 scale10_round_decimal_double (double x, int n)
 {
-  int e;
+  int e IF_LINT(= 0);
   mpn_t m;
   void *memory = decode_double (x, &e, &m);
   return scale10_round_decimal_decoded (e, m, memory, n);