From: hno <> Date: Wed, 24 Oct 2001 12:16:16 +0000 (+0000) Subject: format fixes X-Git-Tag: SQUID_3_0_PRE1~1323 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38650cc81be0886a91af673bd41576066e11b2a8;p=thirdparty%2Fsquid.git format fixes --- diff --git a/src/comm_select.cc b/src/comm_select.cc index 6bd1f9c8f9..c7861f2f5d 100644 --- a/src/comm_select.cc +++ b/src/comm_select.cc @@ -1,6 +1,6 @@ /* - * $Id: comm_select.cc,v 1.51 2001/10/19 22:34:49 hno Exp $ + * $Id: comm_select.cc,v 1.52 2001/10/24 06:16:16 hno Exp $ * * DEBUG: section 5 Socket Functions * @@ -397,7 +397,7 @@ comm_poll(int msec) return COMM_ERROR; /* NOTREACHED */ } - debug(5, num ? 5 : 8) ("comm_poll: %d+%d FDs ready\n", num, npending); + debug(5, num ? 5 : 8) ("comm_poll: %d+%ld FDs ready\n", num, npending); statHistCount(&statCounter.select_fds_hist, num); /* Check timeout handlers ONCE each second. */ if (squid_curtime > last_timeout) { @@ -521,7 +521,7 @@ comm_poll(int msec) return COMM_OK; } while (timeout > current_dtime); - debug(5, 8) ("comm_poll: time out: %d.\n", squid_curtime); + debug(5, 8) ("comm_poll: time out: %ld.\n", (long int)squid_curtime); return COMM_TIMEOUT; } diff --git a/src/dns_internal.cc b/src/dns_internal.cc index 6529e52ecd..2e74276560 100644 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -1,6 +1,6 @@ /* - * $Id: dns_internal.cc,v 1.42 2001/10/12 23:33:00 hno Exp $ + * $Id: dns_internal.cc,v 1.43 2001/10/24 06:16:16 hno Exp $ * * DEBUG: section 78 DNS lookups; interacts with lib/rfc1035.c * AUTHOR: Duane Wessels @@ -718,7 +718,7 @@ snmp_netIdnsFn(variable_list * Var, snint * ErrP) { int i, n = 0; variable_list *Answer = NULL; - debug(49, 5) ("snmp_netDnsFn: Processing request:\n", Var->name[LEN_SQ_NET + 1]); + debug(49, 5) ("snmp_netDnsFn: Processing request: \n"); snmpDebugOid(5, Var->name, Var->name_length); *ErrP = SNMP_ERR_NOERROR; switch (Var->name[LEN_SQ_NET + 1]) { diff --git a/src/fqdncache.cc b/src/fqdncache.cc index deef6e0f63..e8d30a0f5e 100644 --- a/src/fqdncache.cc +++ b/src/fqdncache.cc @@ -1,6 +1,6 @@ /* - * $Id: fqdncache.cc,v 1.148 2001/03/03 10:39:31 hno Exp $ + * $Id: fqdncache.cc,v 1.149 2001/10/24 06:16:16 hno Exp $ * * DEBUG: section 35 FQDN Cache * AUTHOR: Harvest Derived @@ -602,7 +602,7 @@ variable_list * snmp_netFqdnFn(variable_list * Var, snint * ErrP) { variable_list *Answer = NULL; - debug(49, 5) ("snmp_netFqdnFn: Processing request:\n", Var->name[LEN_SQ_NET + 1]); + debug(49, 5) ("snmp_netFqdnFn: Processing request:\n"); snmpDebugOid(5, Var->name, Var->name_length); *ErrP = SNMP_ERR_NOERROR; switch (Var->name[LEN_SQ_NET + 1]) { diff --git a/src/ftp.cc b/src/ftp.cc index 261d3fa9aa..c4b32bc271 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -1,6 +1,6 @@ /* - * $Id: ftp.cc,v 1.313 2001/10/17 20:25:02 hno Exp $ + * $Id: ftp.cc,v 1.314 2001/10/24 06:16:16 hno Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived @@ -1987,7 +1987,7 @@ ftpReadStor(FtpStateData * ftpState) ftpState, 0); } else { - debug(9, 3) ("ftpReadStor: Unexpected reply code %s\n", code); + debug(9, 3) ("ftpReadStor: Unexpected reply code %03d\n", code); ftpFail(ftpState); } } diff --git a/src/helper.cc b/src/helper.cc index 251b121e37..67c3e90047 100644 --- a/src/helper.cc +++ b/src/helper.cc @@ -1,6 +1,6 @@ /* - * $Id: helper.cc,v 1.31 2001/10/17 20:25:02 hno Exp $ + * $Id: helper.cc,v 1.32 2001/10/24 06:16:16 hno Exp $ * * DEBUG: section 29 Helper process maintenance * AUTHOR: Harvest Derived? @@ -264,7 +264,7 @@ helperStatefulSubmit(statefulhelper * hlp, const char *buf, HLPSCB * callback, v } cbdataLock(r->data); if ((buf != NULL) && lastserver) { - debug(29, 5) ("StatefulSubmit with lastserver %d\n", lastserver); + debug(29, 5) ("StatefulSubmit with lastserver %p\n", lastserver); /* the queue doesn't count for this assert because queued requests * have already gone through here and been tested. * It's legal to have deferred_requests == 0 and queue entries @@ -464,7 +464,7 @@ helperStatefulStats(StoreEntry * sentry, statefulhelper * hlp) storeAppendPrintf(sentry, "avg service time: %d msec\n", hlp->stats.avg_svc_time); storeAppendPrintf(sentry, "\n"); - storeAppendPrintf(sentry, "%7s\t%7s\t%7s\t%11s\t%s\t%7s\t%7s\t%7s\n", + storeAppendPrintf(sentry, "%7s\t%7s\t%7s\t%11s\t%s\t%7s\t%7s\t%7s\t%7s\n", "#", "FD", "PID", diff --git a/src/ipcache.cc b/src/ipcache.cc index b7dca00b54..b70c1127dc 100644 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@ -1,6 +1,6 @@ /* - * $Id: ipcache.cc,v 1.234 2001/03/03 10:39:32 hno Exp $ + * $Id: ipcache.cc,v 1.235 2001/10/24 06:16:16 hno Exp $ * * DEBUG: section 14 IP Cache * AUTHOR: Harvest Derived @@ -766,7 +766,7 @@ variable_list * snmp_netIpFn(variable_list * Var, snint * ErrP) { variable_list *Answer = NULL; - debug(49, 5) ("snmp_netIpFn: Processing request:\n", Var->name[LEN_SQ_NET + 1]); + debug(49, 5) ("snmp_netIpFn: Processing request:\n"); snmpDebugOid(5, Var->name, Var->name_length); *ErrP = SNMP_ERR_NOERROR; switch (Var->name[LEN_SQ_NET + 1]) { diff --git a/src/main.cc b/src/main.cc index 945b21475b..36004580d5 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,6 +1,6 @@ /* - * $Id: main.cc,v 1.343 2001/10/23 12:14:49 hno Exp $ + * $Id: main.cc,v 1.344 2001/10/24 06:16:16 hno Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived @@ -705,7 +705,7 @@ main(int argc, char **argv) debug(1, 1) ("Preparing for shutdown after %d requests\n", statCounter.client_http.requests); debug(1, 1) ("Waiting %d seconds for active connections to finish\n", - wait); + (int)wait); do_shutdown = 0; shutting_down = 1; serverConnectionsClose(); diff --git a/src/peer_digest.cc b/src/peer_digest.cc index dcac5e312a..464b184cac 100644 --- a/src/peer_digest.cc +++ b/src/peer_digest.cc @@ -1,6 +1,6 @@ /* - * $Id: peer_digest.cc,v 1.81 2001/04/14 00:25:18 hno Exp $ + * $Id: peer_digest.cc,v 1.82 2001/10/24 06:16:17 hno Exp $ * * DEBUG: section 72 Peer Digest Routines * AUTHOR: Alex Rousskov @@ -193,7 +193,7 @@ peerDigestSetCheck(PeerDigest * pd, time_t delay) eventAdd("peerDigestCheck", peerDigestCheck, pd, (double) delay, 1); pd->times.next_check = squid_curtime + delay; debug(72, 3) ("peerDigestSetCheck: will check peer %s in %d secs\n", - strBuf(pd->host), delay); + strBuf(pd->host), (int)delay); } /* @@ -235,8 +235,8 @@ peerDigestCheck(void *data) return; } debug(72, 3) ("peerDigestCheck: peer %s:%d\n", pd->peer->host, pd->peer->http_port); - debug(72, 3) ("peerDigestCheck: time: %d, last received: %d (%+d)\n", - squid_curtime, pd->times.received, (squid_curtime - pd->times.received)); + debug(72, 3) ("peerDigestCheck: time: %ld, last received: %ld (%+d)\n", + (long int)squid_curtime, (long int)pd->times.received, (int)(squid_curtime - pd->times.received)); /* decide when we should send the request: * request now unless too close to other requests */ @@ -245,15 +245,15 @@ peerDigestCheck(void *data) /* per-peer limit */ if (req_time - pd->times.received < PeerDigestReqMinGap) { debug(72, 2) ("peerDigestCheck: %s, avoiding close peer requests (%d < %d secs).\n", - strBuf(pd->host), req_time - pd->times.received, - PeerDigestReqMinGap); + strBuf(pd->host), (int)(req_time - pd->times.received), + (int)PeerDigestReqMinGap); req_time = pd->times.received + PeerDigestReqMinGap; } /* global limit */ if (req_time - pd_last_req_time < GlobDigestReqMinGap) { debug(72, 2) ("peerDigestCheck: %s, avoiding close requests (%d < %d secs).\n", - strBuf(pd->host), req_time - pd_last_req_time, - GlobDigestReqMinGap); + strBuf(pd->host), (int)(req_time - pd_last_req_time), + (int)GlobDigestReqMinGap); req_time = pd_last_req_time + GlobDigestReqMinGap; } if (req_time <= squid_curtime) @@ -353,9 +353,9 @@ peerDigestFetchReply(void *data, char *buf, ssize_t size) assert(reply); httpReplyParse(reply, buf, hdr_size); status = reply->sline.status; - debug(72, 3) ("peerDigestFetchReply: %s status: %d, expires: %d (%+d)\n", + debug(72, 3) ("peerDigestFetchReply: %s status: %d, expires: %ld (%+d)\n", strBuf(pd->host), status, - reply->expires, reply->expires - squid_curtime); + (long int)reply->expires, (int)(reply->expires - squid_curtime)); /* this "if" is based on clientHandleIMSReply() */ if (status == HTTP_NOT_MODIFIED) { @@ -730,10 +730,10 @@ peerDigestFetchSetStats(DigestFetchState * fetch) fetch->resp_time = squid_curtime - fetch->start_time; debug(72, 3) ("peerDigestFetchFinish: recv %d bytes in %d secs\n", - fetch->recv.bytes, fetch->resp_time); - debug(72, 3) ("peerDigestFetchFinish: expires: %d (%+d), lmt: %d (%+d)\n", - fetch->expires, fetch->expires - squid_curtime, - fetch->entry->lastmod, fetch->entry->lastmod - squid_curtime); + fetch->recv.bytes, (int)fetch->resp_time); + debug(72, 3) ("peerDigestFetchFinish: expires: %ld (%+d), lmt: %ld (%+d)\n", + (long int)fetch->expires, (int)(fetch->expires - squid_curtime), + (long int)fetch->entry->lastmod, (int)(fetch->entry->lastmod - squid_curtime)); } @@ -835,8 +835,8 @@ void peerDigestStatsReport(const PeerDigest * pd, StoreEntry * e) { #define f2s(flag) (pd->flags.flag ? "yes" : "no") -#define appendTime(tm) storeAppendPrintf(e, "%s\t %10d\t %+d\t %+d\n", \ - ""#tm, pd->times.tm, \ +#define appendTime(tm) storeAppendPrintf(e, "%s\t %10ld\t %+d\t %+d\n", \ + ""#tm, (long int)pd->times.tm, \ saneDiff(pd->times.tm - squid_curtime), \ saneDiff(pd->times.tm - pd->times.initialized)) @@ -858,9 +858,9 @@ peerDigestStatsReport(const PeerDigest * pd, StoreEntry * e) storeAppendPrintf(e, "\tneeded: %3s, usable: %3s, requested: %3s\n", f2s(needed), f2s(usable), f2s(requested)); storeAppendPrintf(e, "\n\tlast retry delay: %d secs\n", - pd->times.retry_delay); + (int)pd->times.retry_delay); storeAppendPrintf(e, "\tlast request response time: %d secs\n", - pd->times.req_delay); + (int)pd->times.req_delay); storeAppendPrintf(e, "\tlast request result: %s\n", pd->req_result ? pd->req_result : "(none)"); diff --git a/src/snmp_agent.cc b/src/snmp_agent.cc index 4d637d1f60..35c048278e 100644 --- a/src/snmp_agent.cc +++ b/src/snmp_agent.cc @@ -1,6 +1,6 @@ /* - * $Id: snmp_agent.cc,v 1.82 2001/10/17 20:25:03 hno Exp $ + * $Id: snmp_agent.cc,v 1.83 2001/10/24 06:16:17 hno Exp $ * * DEBUG: section 49 SNMP Interface * AUTHOR: Kostas Anagnostakis @@ -47,7 +47,7 @@ variable_list * snmp_sysFn(variable_list * Var, snint * ErrP) { variable_list *Answer = NULL; - debug(49, 5) ("snmp_sysFn: Processing request:\n", Var->name[LEN_SQ_SYS]); + debug(49, 5) ("snmp_sysFn: Processing request:\n"); snmpDebugOid(5, Var->name, Var->name_length); *ErrP = SNMP_ERR_NOERROR; switch (Var->name[LEN_SQ_SYS]) { @@ -411,9 +411,9 @@ snmp_prfProtoFn(variable_list * Var, snint * ErrP) break; f = snmpStatGet(0); l = snmpStatGet(minutes); - debug(49, 8) ("median: min= %d, %d l= %x , f = %x\n", minutes, + debug(49, 8) ("median: min= %d, %d l= %p , f = %p\n", minutes, Var->name[LEN_SQ_PRF + 3], l, f); - debug(49, 8) ("median: l= %x , f = %x\n", l, f); + debug(49, 8) ("median: l= %p , f = %p\n", l, f); switch (Var->name[LEN_SQ_PRF + 3]) { case PERF_MEDIAN_TIME: x = minutes; diff --git a/src/stat.cc b/src/stat.cc index edb099c2b5..53049f150b 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -1,6 +1,6 @@ /* - * $Id: stat.cc,v 1.348 2001/08/16 00:16:18 hno Exp $ + * $Id: stat.cc,v 1.349 2001/10/24 06:16:17 hno Exp $ * * DEBUG: section 18 Cache Manager Statistics * AUTHOR: Harvest Derived @@ -1409,8 +1409,8 @@ statClientRequests(StoreEntry * s) storeAppendPrintf(s, "\tFD %d, read %d, wrote %d\n", fd, fd_table[fd].bytes_read, fd_table[fd].bytes_written); storeAppendPrintf(s, "\tFD desc: %s\n", fd_table[fd].desc); - storeAppendPrintf(s, "\tin: buf %p, offset %d, size %d\n", - conn->in.buf, conn->in.offset, conn->in.size); + storeAppendPrintf(s, "\tin: buf %p, offset %ld, size %ld\n", + conn->in.buf, (long int)conn->in.offset, (long int)conn->in.size); storeAppendPrintf(s, "\tpeer: %s:%d\n", inet_ntoa(conn->peer.sin_addr), ntohs(conn->peer.sin_port)); @@ -1419,20 +1419,21 @@ statClientRequests(StoreEntry * s) ntohs(conn->me.sin_port)); storeAppendPrintf(s, "\tnrequests: %d\n", conn->nrequests); - storeAppendPrintf(s, "\tdefer: n %d, until %d\n", - conn->defer.n, conn->defer.until); + storeAppendPrintf(s, "\tdefer: n %d, until %ld\n", + conn->defer.n, (long int)conn->defer.until); } storeAppendPrintf(s, "uri %s\n", http->uri); storeAppendPrintf(s, "log_type %s\n", log_tags[http->log_type]); - storeAppendPrintf(s, "out.offset %d, out.size %d\n", - http->out.offset, http->out.size); + storeAppendPrintf(s, "out.offset %ld, out.size %lu\n", + (long int)http->out.offset, (unsigned long int)http->out.size); storeAppendPrintf(s, "req_sz %d\n", http->req_sz); e = http->entry; storeAppendPrintf(s, "entry %p/%s\n", e, e ? storeKeyText(e->hash.key) : "N/A"); e = http->old_entry; storeAppendPrintf(s, "old_entry %p/%s\n", e, e ? storeKeyText(e->hash.key) : "N/A"); - storeAppendPrintf(s, "start %d.%06d (%f seconds ago)\n", http->start.tv_sec, - http->start.tv_usec, + storeAppendPrintf(s, "start %ld.%06d (%f seconds ago)\n", + (long int)http->start.tv_sec, + (int)http->start.tv_usec, tvSubDsec(http->start, current_time)); storeAppendPrintf(s, "\n"); } diff --git a/src/store.cc b/src/store.cc index 253c768daf..6c135169e3 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,6 +1,6 @@ /* - * $Id: store.cc,v 1.542 2001/10/17 20:25:03 hno Exp $ + * $Id: store.cc,v 1.543 2001/10/24 06:16:17 hno Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived @@ -1142,8 +1142,6 @@ storeMemObjectDump(MemObject * mem) (int) mem->inmem_hi); debug(20, 1) ("MemObject->inmem_lo: %d\n", (int) mem->inmem_lo); - debug(20, 1) ("MemObject->clients: %p\n", - mem->clients); debug(20, 1) ("MemObject->nclients: %d\n", mem->nclients); debug(20, 1) ("MemObject->reply: %p\n", diff --git a/src/store_client.cc b/src/store_client.cc index 8f0fcb4756..f3c91878e9 100644 --- a/src/store_client.cc +++ b/src/store_client.cc @@ -1,6 +1,6 @@ /* - * $Id: store_client.cc,v 1.102 2001/04/14 00:25:19 hno Exp $ + * $Id: store_client.cc,v 1.103 2001/10/24 06:16:18 hno Exp $ * * DEBUG: section 20 Storage Manager Client-Side Interface * AUTHOR: Duane Wessels @@ -426,7 +426,7 @@ storeClientReadHeader(void *data, const char *buf, ssize_t len) (void) 0; /* a match! */ else { debug(20, 1) ("storeClientReadHeader: URL mismatch\n"); - debug(20, 1) ("\t{%s} != {%s}\n", t->value, mem->url); + debug(20, 1) ("\t{%s} != {%s}\n", (char *)t->value, mem->url); swap_object_ok = 0; break; } diff --git a/src/store_digest.cc b/src/store_digest.cc index 393bdf4b83..2ed4449752 100644 --- a/src/store_digest.cc +++ b/src/store_digest.cc @@ -1,6 +1,6 @@ /* - * $Id: store_digest.cc,v 1.49 2001/03/03 10:39:34 hno Exp $ + * $Id: store_digest.cc,v 1.50 2001/10/24 06:16:18 hno Exp $ * * DEBUG: section 71 Store Digest Manager * AUTHOR: Alex Rousskov @@ -104,7 +104,7 @@ storeDigestInit(void) } store_digest = cacheDigestCreate(cap, Config.digest.bits_per_entry); debug(71, 1) ("Local cache digest enabled; rebuild/rewrite every %d/%d sec\n", - Config.digest.rebuild_period, Config.digest.rewrite_period); + (int)Config.digest.rebuild_period, (int)Config.digest.rewrite_period); memset(&sd_state, 0, sizeof(sd_state)); cachemgrRegister("store_digest", "Store Digest", storeDigestReport, 0, 1); @@ -219,7 +219,7 @@ storeDigestAddable(const StoreEntry * e) /* Note: We should use the time of the next rebuild, not (cur_time+period) */ if (refreshCheckDigest(e, Config.digest.rebuild_period)) { debug(71, 6) ("storeDigestAdd: entry expires within %d secs, ignoring\n", - Config.digest.rebuild_period); + (int)Config.digest.rebuild_period); return 0; } /* @@ -383,8 +383,8 @@ storeDigestRewriteResume(void) httpReplySetHeaders(e->mem_obj->reply, version, 200, "Cache Digest OK", "application/cache-digest", store_digest->mask_size + sizeof(sd_state.cblock), squid_curtime, squid_curtime + Config.digest.rewrite_period); - debug(71, 3) ("storeDigestRewrite: entry expires on %d (%+d)\n", - e->mem_obj->reply->expires, e->mem_obj->reply->expires - squid_curtime); + debug(71, 3) ("storeDigestRewrite: entry expires on %ld (%+d)\n", + (long int)e->mem_obj->reply->expires, (int)(e->mem_obj->reply->expires - squid_curtime)); storeBuffer(e); httpReplySwapOut(e->mem_obj->reply, e); storeDigestCBlockSwapOut(e); @@ -399,8 +399,8 @@ storeDigestRewriteFinish(StoreEntry * e) assert(sd_state.rewrite_lock && e == sd_state.rewrite_lock->data); storeComplete(e); storeTimestampsSet(e); - debug(71, 2) ("storeDigestRewriteFinish: digest expires at %d (%+d)\n", - e->expires, e->expires - squid_curtime); + debug(71, 2) ("storeDigestRewriteFinish: digest expires at %ld (%+d)\n", + (long int)e->expires, (int)(e->expires - squid_curtime)); /* is this the write order? @?@ */ requestUnlink(e->mem_obj->request); e->mem_obj->request = NULL;