1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Removed gcc 4.0 warnings, by Russ Allberry.

This commit is contained in:
hniksic 2005-10-09 02:59:20 -07:00
parent 1ff7c1fa70
commit 02e8aa3ac4
2 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2005-10-09 Russ Allbery <rra@stanford.edu>
* snprintf.c: Remove round to round_int and pow10 to pow10_int, to
avoid warnings from GCC 4.0.
2005-10-05 Mauro Tortonesi <mauro@ferrara.linux.it> 2005-10-05 Mauro Tortonesi <mauro@ferrara.linux.it>
* retr.c: Changed semantics of no_proxy_match. * retr.c: Changed semantics of no_proxy_match.

View File

@ -618,7 +618,7 @@ static LDOUBLE abs_val (LDOUBLE value)
return result; return result;
} }
static LDOUBLE pow10 (int exp) static LDOUBLE pow10_int (int exp)
{ {
LDOUBLE result = 1; LDOUBLE result = 1;
@ -631,7 +631,7 @@ static LDOUBLE pow10 (int exp)
return result; return result;
} }
static LLONG round (LDOUBLE value) static LLONG round_int (LDOUBLE value)
{ {
LLONG intpart; LLONG intpart;
@ -729,12 +729,12 @@ static int fmtfp (char *buffer, size_t *currlen, size_t maxlen,
max = MAX_DIGITS; max = MAX_DIGITS;
/* Factor of 10 with the needed number of digits, e.g. 1000 for max==3 */ /* 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 /* We "cheat" by converting the fractional part to integer by
* multiplying by a factor of 10 * multiplying by a factor of 10
*/ */
fracpart = round (mask10 * (ufvalue - intpart)); fracpart = round_int (mask10 * (ufvalue - intpart));
if (fracpart >= mask10) if (fracpart >= mask10)
{ {