From 02e8aa3ac4e8ecd3a5e3894887e07e2cbc306940 Mon Sep 17 00:00:00 2001 From: hniksic Date: Sun, 9 Oct 2005 02:59:20 -0700 Subject: [PATCH] [svn] Removed gcc 4.0 warnings, by Russ Allberry. --- src/ChangeLog | 5 +++++ src/snprintf.c | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index cd5714b2..171a4ef5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-10-09 Russ Allbery + + * snprintf.c: Remove round to round_int and pow10 to pow10_int, to + avoid warnings from GCC 4.0. + 2005-10-05 Mauro Tortonesi * retr.c: Changed semantics of no_proxy_match. diff --git a/src/snprintf.c b/src/snprintf.c index a6835076..057ccc27 100644 --- a/src/snprintf.c +++ b/src/snprintf.c @@ -618,7 +618,7 @@ static LDOUBLE abs_val (LDOUBLE value) return result; } -static LDOUBLE pow10 (int exp) +static LDOUBLE pow10_int (int exp) { LDOUBLE result = 1; @@ -631,7 +631,7 @@ static LDOUBLE pow10 (int exp) return result; } -static LLONG round (LDOUBLE value) +static LLONG round_int (LDOUBLE value) { LLONG intpart; @@ -729,12 +729,12 @@ static int fmtfp (char *buffer, size_t *currlen, size_t maxlen, max = MAX_DIGITS; /* Factor of 10 with the needed number of digits, e.g. 1000 for max==3 */ - mask10 = pow10 (max); + mask10 = pow10_int (max); /* We "cheat" by converting the fractional part to integer by * multiplying by a factor of 10 */ - fracpart = round (mask10 * (ufvalue - intpart)); + fracpart = round_int (mask10 * (ufvalue - intpart)); if (fracpart >= mask10) {