From: wessels <> Date: Fri, 23 Feb 1996 14:07:25 +0000 (+0000) Subject: gcc -Wall cleanup X-Git-Tag: SQUID_3_0_PRE1~6422 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=644642abc41e1f3e3106544a37330af541d9b98a;p=thirdparty%2Fsquid.git gcc -Wall cleanup --- diff --git a/src/ipcache.cc b/src/ipcache.cc index 7360e6f5dc..4aa471af39 100644 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@ -1,4 +1,4 @@ -static char rcsid[] = "$Id: ipcache.cc,v 1.2 1996/02/23 07:07:24 wessels Exp $"; +static char rcsid[] = "$Id: ipcache.cc,v 1.3 1996/02/23 07:09:10 wessels Exp $"; /* * File: ipcache.c * Description: ip address cache. speed up gethostbyname() @@ -108,6 +108,7 @@ static char rcsid[] = "$Id: ipcache.cc,v 1.2 1996/02/23 07:07:24 wessels Exp $"; #include "autoconf.h" #include "stat.h" #include "hash.h" +#include "disk.h" #include "util.h" struct hostent *gethostbyname(); @@ -191,7 +192,6 @@ extern time_t cached_curtime; extern int getMaxFD(); extern int getDnsChildren(); extern void fatal_dump _PARAMS((char *)); -extern int file_write_lock _PARAMS((int)); extern int file_update_open _PARAMS((int, char *)); void update_dns_child_alive() diff --git a/src/stat.cc b/src/stat.cc index 58a7c38c09..5d92822287 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -1,4 +1,4 @@ -static char rcsid[] = "$Id: stat.cc,v 1.3 1996/02/23 06:56:34 wessels Exp $"; +static char rcsid[] = "$Id: stat.cc,v 1.4 1996/02/23 07:07:25 wessels Exp $"; /* * File: stat.c * Description: stat module for object cache @@ -143,6 +143,8 @@ extern int fdstat_are_n_free_fd _PARAMS((int)); extern int comm_get_fd_timeout _PARAMS((int)); extern int file_write_lock _PARAMS((int)); extern void fatal _PARAMS((char *)); +extern void fatal_dump _PARAMS((char *)); + char *stat_describe(); char *mem_describe(); char *ttl_describe(); @@ -279,7 +281,7 @@ void stat_objects_get(obj, sentry, vm_or_not) if (entry->mem_obj) obj_size = entry->mem_obj->e_current_len; tempbuf[0] = '\0'; - sprintf(tempbuf, "{ %s %d %s %s %s %s %d %ld %s %s }\n", + sprintf(tempbuf, "{ %s %d %s %s %s %s %d %d %s %s }\n", entry->url, obj_size, elapsed_time(entry, (int) entry->timestamp, space), @@ -287,7 +289,7 @@ void stat_objects_get(obj, sentry, vm_or_not) elapsed_time(entry, (int) entry->lastref, space2), ttl_describe(entry, (int) entry->expires), npend, - entry->refcount, + (int) entry->refcount, mem_describe(entry), stat_describe(entry)); storeAppend(sentry, tempbuf, strlen(tempbuf)); @@ -673,10 +675,10 @@ void info_get(obj, sentry) /* the lifetime should be greater than curtime */ lft = comm_get_fd_lifetime(i); to = comm_get_fd_timeout(i); - sprintf(line, "{\t\t(%3d = %3ld, %3ld) NET %s}\n", + sprintf(line, "{\t\t(%3d = %3d, %3d) NET %s}\n", i, - lft > 0 ? lft - cached_curtime : -1, - max((to - cached_curtime), 0), + (int) (lft > 0 ? lft - cached_curtime : -1), + (int) max((to - cached_curtime), 0), fd_note(i, NULL)); break; case File: