From 32754419a27c336e2469c7af600096aa6fdc39ab Mon Sep 17 00:00:00 2001 From: hno <> Date: Wed, 24 Oct 2001 13:45:33 +0000 Subject: [PATCH] format fixes --- src/asn.cc | 6 ++-- src/authenticate.cc | 14 ++++----- src/cache_cf.cc | 8 ++--- src/client_side.cc | 56 ++++++++++++++++----------------- src/comm.cc | 6 ++-- src/dns_internal.cc | 6 ++-- src/errorpage.cc | 4 +-- src/filemap.cc | 4 +-- src/fs/aufs/store_dir_aufs.cc | 12 +++---- src/fs/aufs/store_io_aufs.cc | 12 +++---- src/fs/coss/store_io_coss.cc | 22 ++++++------- src/fs/diskd/store_dir_diskd.cc | 12 +++---- src/fs/ufs/store_dir_ufs.cc | 8 ++--- src/fs/ufs/store_io_ufs.cc | 4 +-- src/ftp.cc | 10 +++--- src/gopher.cc | 4 +-- src/helper.cc | 8 ++--- src/structs.h | 4 +-- 18 files changed, 100 insertions(+), 100 deletions(-) diff --git a/src/asn.cc b/src/asn.cc index 5b824a6517..4b2b073039 100644 --- a/src/asn.cc +++ b/src/asn.cc @@ -1,6 +1,6 @@ /* - * $Id: asn.cc,v 1.76 2001/10/24 06:55:44 hno Exp $ + * $Id: asn.cc,v 1.77 2001/10/24 07:45:33 hno Exp $ * * DEBUG: section 53 AS Number handling * AUTHOR: Duane Wessels, Kostas Anagnostakis @@ -223,7 +223,7 @@ asHandleReply(void *data, char *buf, ssize_t size) StoreEntry *e = asState->entry; char *s; char *t; - debug(53, 3) ("asHandleReply: Called with size=%d\n", size); + debug(53, 3) ("asHandleReply: Called with size=%ld\n", (long int) size); if (EBIT_TEST(e->flags, ENTRY_ABORTED)) { memFree(buf, MEM_4K_BUF); asStateFree(asState); @@ -234,7 +234,7 @@ asHandleReply(void *data, char *buf, ssize_t size) asStateFree(asState); return; } else if (size < 0) { - debug(53, 1) ("asHandleReply: Called with size=%d\n", size); + debug(53, 1) ("asHandleReply: Called with size=%ld\n", (long int) size); memFree(buf, MEM_4K_BUF); asStateFree(asState); return; diff --git a/src/authenticate.cc b/src/authenticate.cc index f93f1005fa..f6779e1ad5 100644 --- a/src/authenticate.cc +++ b/src/authenticate.cc @@ -1,6 +1,6 @@ /* - * $Id: authenticate.cc,v 1.33 2001/10/24 06:55:44 hno Exp $ + * $Id: authenticate.cc,v 1.34 2001/10/24 07:45:34 hno Exp $ * * DEBUG: section 29 Authenticator * AUTHOR: Duane Wessels @@ -740,7 +740,7 @@ authenticateAuthUserLock(auth_user_t * auth_user) debug(29, 9) ("authenticateAuthUserLock auth_user '%p'.\n", auth_user); assert(auth_user != NULL); auth_user->references++; - debug(29, 9) ("authenticateAuthUserLock auth_user '%p' now at '%d'.\n", auth_user, auth_user->references); + debug(29, 9) ("authenticateAuthUserLock auth_user '%p' now at '%ld'.\n", auth_user, (long int) auth_user->references); } void @@ -753,7 +753,7 @@ authenticateAuthUserUnlock(auth_user_t * auth_user) } else { debug(29, 1) ("Attempt to lower Auth User %p refcount below 0!\n", auth_user); } - debug(29, 9) ("authenticateAuthUserUnlock auth_user '%p' now at '%d'.\n", auth_user, auth_user->references); + debug(29, 9) ("authenticateAuthUserUnlock auth_user '%p' now at '%ld'.\n", auth_user, (long int) auth_user->references); if (auth_user->references == 0) authenticateFreeProxyAuthUser(auth_user); } @@ -764,7 +764,7 @@ authenticateAuthUserRequestLock(auth_user_request_t * auth_user_request) debug(29, 9) ("authenticateAuthUserRequestLock auth_user request '%p'.\n", auth_user_request); assert(auth_user_request != NULL); auth_user_request->references++; - debug(29, 9) ("authenticateAuthUserRequestLock auth_user request '%p' now at '%d'.\n", auth_user_request, auth_user_request->references); + debug(29, 9) ("authenticateAuthUserRequestLock auth_user request '%p' now at '%ld'.\n", auth_user_request, (long int) auth_user_request->references); } void @@ -777,7 +777,7 @@ authenticateAuthUserRequestUnlock(auth_user_request_t * auth_user_request) } else { debug(29, 1) ("Attempt to lower Auth User request %p refcount below 0!\n", auth_user_request); } - debug(29, 9) ("authenticateAuthUserRequestUnlock auth_user_request '%p' now at '%d'.\n", auth_user_request, auth_user_request->references); + debug(29, 9) ("authenticateAuthUserRequestUnlock auth_user_request '%p' now at '%ld'.\n", auth_user_request, (long int) auth_user_request->references); if (auth_user_request->references == 0) { /* not locked anymore */ authenticateAuthUserRequestFree(auth_user_request); @@ -825,7 +825,7 @@ authenticateFreeProxyAuthUser(void *data) auth_user_request_t *auth_user_request; dlink_node *link, *tmplink; assert(data != NULL); - debug(29, 5) ("authenticateFreeProxyAuthUser: Freeing auth_user '%p' with refcount '%d'.\n", u, u->references); + debug(29, 5) ("authenticateFreeProxyAuthUser: Freeing auth_user '%p' with refcount '%ld'.\n", u, (long int) u->references); assert(u->references == 0); /* were they linked in by username ? */ if (u->usernamehash) { @@ -891,7 +891,7 @@ authenticateProxyUserCacheCleanup(void *datanotused) /* if we need to have inpedendent expiry clauses, insert a module call * here */ - debug(29, 4) ("authenticateProxyUserCacheCleanup: Cache entry:\n\tType: %d\n\tUsername: %s\n\texpires: %ld\n\treferences: %d\n", auth_user->auth_type, username, (long int) (auth_user->expiretime + Config.authenticateTTL), auth_user->references); + debug(29, 4) ("authenticateProxyUserCacheCleanup: Cache entry:\n\tType: %d\n\tUsername: %s\n\texpires: %ld\n\treferences: %ld\n", auth_user->auth_type, username, (long int) (auth_user->expiretime + Config.authenticateTTL), (long int) auth_user->references); if (auth_user->expiretime + Config.authenticateTTL <= current_time.tv_sec) { debug(29, 5) ("authenticateProxyUserCacheCleanup: Removing user %s from cache due to timeout.\n", username); /* the minus 1 accounts for the cache lock */ diff --git a/src/cache_cf.cc b/src/cache_cf.cc index ed58b0813f..e306277706 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1,6 +1,6 @@ /* - * $Id: cache_cf.cc,v 1.395 2001/10/24 05:46:26 hno Exp $ + * $Id: cache_cf.cc,v 1.396 2001/10/24 07:45:34 hno Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -1260,7 +1260,7 @@ parse_cachedir_option_maxsize(SwapDir * sd, const char *option, const char *valu size = atoi(value); if (reconfiguring && sd->max_objsize != size) - debug(3, 1) ("Cache dir '%s' max object size now %d\n", sd->path, size); + debug(3, 1) ("Cache dir '%s' max object size now %ld\n", sd->path, (long int) size); sd->max_objsize = size; } @@ -1269,7 +1269,7 @@ static void dump_cachedir_option_maxsize(StoreEntry * e, const char *option, SwapDir * sd) { if (sd->max_objsize != -1) - storeAppendPrintf(e, " %s=%d", option, sd->max_objsize); + storeAppendPrintf(e, " %s=%ld", option, (long int) sd->max_objsize); } void @@ -2001,7 +2001,7 @@ dump_body_size_t(StoreEntry * entry, const char *name, dlink_list bodylist) acl_list *l; acl_access *head = bs->access_list; while (head != NULL) { - storeAppendPrintf(entry, "%s %d %s", name, bs->maxsize, + storeAppendPrintf(entry, "%s %ld %s", name, (long int) bs->maxsize, head->allow ? "Allow" : "Deny"); for (l = head->acl_list; l != NULL; l = l->next) { storeAppendPrintf(entry, " %s%s", diff --git a/src/client_side.cc b/src/client_side.cc index c257b98a9b..5de622bd85 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.554 2001/10/24 06:55:44 hno Exp $ + * $Id: client_side.cc,v 1.555 2001/10/24 07:45:34 hno Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -114,7 +114,7 @@ static int clientHierarchical(clientHttpRequest * http); static int clientCheckContentLength(request_t * r); static DEFER httpAcceptDefer; static log_type clientProcessRequest2(clientHttpRequest * http); -static int clientReplyBodyTooLarge(HttpReply *, int clen); +static int clientReplyBodyTooLarge(HttpReply *, ssize_t clen); static int clientRequestBodyTooLarge(int clen); static void clientProcessBody(ConnStateData * conn); @@ -390,7 +390,7 @@ clientProcessExpired(void *data) delaySetStoreClient(http->sc, delayClient(http->request)); #endif http->request->lastmod = http->old_entry->lastmod; - debug(33, 5) ("clientProcessExpired: lastmod %d\n", (int) entry->lastmod); + debug(33, 5) ("clientProcessExpired: lastmod %ld\n", (long int) entry->lastmod); http->entry = entry; http->out.offset = 0; fwdStart(http->conn->fd, http->entry, http->request); @@ -435,8 +435,8 @@ clientGetsOldEntry(StoreEntry * new_entry, StoreEntry * old_entry, request_t * r /* If the client IMS time is prior to the entry LASTMOD time we * need to send the old object */ if (modifiedSince(old_entry, request)) { - debug(33, 5) ("clientGetsOldEntry: YES, modified since %d\n", - (int) request->ims); + debug(33, 5) ("clientGetsOldEntry: YES, modified since %ld\n", + (long int) request->ims); return 1; } debug(33, 5) ("clientGetsOldEntry: NO, new one is fine\n"); @@ -455,7 +455,7 @@ clientHandleIMSReply(void *data, char *buf, ssize_t size) StoreEntry *oldentry; int recopy = 1; http_status status; - debug(33, 3) ("clientHandleIMSReply: %s, %d bytes\n", url, (int) size); + debug(33, 3) ("clientHandleIMSReply: %s, %ld bytes\n", url, (long int) size); if (entry == NULL) { memFree(buf, MEM_CLIENT_SOCK_BUF); return; @@ -560,7 +560,7 @@ modifiedSince(StoreEntry * entry, request_t * request) debug(33, 3) ("modifiedSince: '%s'\n", storeUrl(entry)); if (mod_time < 0) mod_time = entry->timestamp; - debug(33, 3) ("modifiedSince: mod_time = %d\n", (int) mod_time); + debug(33, 3) ("modifiedSince: mod_time = %ld\n", (long int) mod_time); if (mod_time < 0) return 1; /* Find size of the object */ @@ -1176,8 +1176,8 @@ clientMRangeCLen(clientHttpRequest * http) /* account for range content */ clen += spec->length; - debug(33, 6) ("clientMRangeCLen: (clen += %d + %d) == %d\n", - mb.size, spec->length, clen); + debug(33, 6) ("clientMRangeCLen: (clen += %ld + %ld) == %d\n", + (long int) mb.size, (long int) spec->length, clen); } /* account for the terminating boundary */ memBufReset(&mb); @@ -1606,7 +1606,7 @@ static void clientPackTermBound(String boundary, MemBuf * mb) { memBufPrintf(mb, "\r\n--%s--\r\n", strBuf(boundary)); - debug(33, 6) ("clientPackTermBound: buf offset: %d\n", mb->size); + debug(33, 6) ("clientPackTermBound: buf offset: %ld\n", (long int) mb->size); } /* appends a "part" HTTP header (as in a multi-part/range reply) to the buffer */ @@ -1673,7 +1673,7 @@ clientPackRange(clientHttpRequest * http, /* * append content */ - debug(33, 3) ("clientPackRange: appending %d bytes\n", copy_sz); + debug(33, 3) ("clientPackRange: appending %ld bytes\n", (long int) copy_sz); memBufAppend(mb, *buf, copy_sz); /* * update offsets @@ -1721,10 +1721,10 @@ clientPackMoreRanges(clientHttpRequest * http, const char *buf, ssize_t size, Me off_t start; /* offset of still missing data */ assert(i->spec); start = i->spec->offset + i->spec->length - i->debt_size; - debug(33, 3) ("clientPackMoreRanges: in: offset: %d size: %d\n", - (int) body_off, size); - debug(33, 3) ("clientPackMoreRanges: out: start: %d spec[%d]: [%d, %d), len: %d debt: %d\n", - (int) start, (int) i->pos, i->spec->offset, (int) (i->spec->offset + i->spec->length), i->spec->length, i->debt_size); + debug(33, 3) ("clientPackMoreRanges: in: offset: %ld size: %ld\n", + (long int) body_off, (long int) size); + debug(33, 3) ("clientPackMoreRanges: out: start: %ld spec[%ld]: [%ld, %ld), len: %ld debt: %ld\n", + (long int) start, (long int) i->pos, (long int) i->spec->offset, (long int) (i->spec->offset + i->spec->length), (long int) i->spec->length, (long int) i->debt_size); assert(body_off <= start); /* we did not miss it */ /* skip up to start */ if (body_off + size > start) { @@ -1746,11 +1746,11 @@ clientPackMoreRanges(clientHttpRequest * http, const char *buf, ssize_t size, Me } } assert(!i->debt_size == !i->spec); /* paranoid sync condition */ - debug(33, 3) ("clientPackMoreRanges: buf exhausted: in: offset: %d size: %d need_more: %d\n", - (int) body_off, size, i->debt_size); + debug(33, 3) ("clientPackMoreRanges: buf exhausted: in: offset: %ld size: %ld need_more: %ld\n", + (long int) body_off, (long int) size, (long int) i->debt_size); if (i->debt_size) { - debug(33, 3) ("clientPackMoreRanges: need more: spec[%d]: [%d, %d), len: %d\n", - (int) i->pos, i->spec->offset, (int) (i->spec->offset + i->spec->length), i->spec->length); + debug(33, 3) ("clientPackMoreRanges: need more: spec[%ld]: [%ld, %ld), len: %ld\n", + (long int) i->pos, (long int) i->spec->offset, (long int) (i->spec->offset + i->spec->length), (long int) i->spec->length); /* skip the data we do not need if possible */ if (i->debt_size == i->spec->length) /* at the start of the cur. spec */ body_off = i->spec->offset; @@ -1765,7 +1765,7 @@ clientPackMoreRanges(clientHttpRequest * http, const char *buf, ssize_t size, Me } static int -clientReplyBodyTooLarge(HttpReply * rep, int clen) +clientReplyBodyTooLarge(HttpReply * rep, ssize_t clen) { if (0 == rep->maxBodySize) return 0; /* disabled */ @@ -1837,8 +1837,8 @@ clientSendMoreData(void *data, char *buf, ssize_t size) assert(http->request != NULL); dlinkDelete(&http->active, &ClientActiveRequests); dlinkAdd(http, &http->active, &ClientActiveRequests); - debug(33, 5) ("clientSendMoreData: FD %d '%s', out.offset=%d \n", - fd, storeUrl(entry), (int) http->out.offset); + debug(33, 5) ("clientSendMoreData: FD %d '%s', out.offset=%ld \n", + fd, storeUrl(entry), (long int) http->out.offset); if (conn->chr != http) { /* there is another object in progress, defer this one */ debug(33, 1) ("clientSendMoreData: Deferring %s\n", storeUrl(entry)); @@ -1891,7 +1891,7 @@ clientSendMoreData(void *data, char *buf, ssize_t size) body_buf = buf + rep->hdr_sz; http->range_iter.prefix_size = rep->hdr_sz; debug(33, 3) ("clientSendMoreData: Appending %d bytes after %d bytes of headers\n", - body_size, rep->hdr_sz); + (int) body_size, rep->hdr_sz); ch = aclChecklistCreate(Config.accessList.reply, http->request, NULL); ch->reply = rep; rv = aclCheckFast(Config.accessList.reply, ch); @@ -2068,8 +2068,8 @@ clientWriteComplete(int fd, char *bufnotused, size_t size, int errflag, void *da StoreEntry *entry = http->entry; int done; http->out.size += size; - debug(33, 5) ("clientWriteComplete: FD %d, sz %d, err %d, off %d, len %d\n", - fd, size, errflag, (int) http->out.offset, entry ? objectLen(entry) : 0); + debug(33, 5) ("clientWriteComplete: FD %d, sz %ld, err %d, off %ld, len %d\n", + fd, (long int) size, errflag, (long int) http->out.offset, entry ? objectLen(entry) : 0); if (size > 0) { kb_incr(&statCounter.client_http.kbytes_out, size); if (isTcpHit(http->log_type)) @@ -2102,7 +2102,7 @@ clientWriteComplete(int fd, char *bufnotused, size_t size, int errflag, void *da } else { comm_close(fd); } - } else if (clientReplyBodyTooLarge(entry->mem_obj->reply, (int) http->out.offset)) { + } else if (clientReplyBodyTooLarge(entry->mem_obj->reply, http->out.offset)) { comm_close(fd); } else { /* More data will be coming from primary server; register with @@ -2943,8 +2943,8 @@ clientReadRequest(int fd, void *data) /* The request is too large to handle */ debug(33, 1) ("Request header is too large (%d bytes)\n", (int) conn->in.offset); - debug(33, 1) ("Config 'request_header_max_size'= %d bytes.\n", - Config.maxRequestHeaderSize); + debug(33, 1) ("Config 'request_header_max_size'= %ld bytes.\n", + (long int) Config.maxRequestHeaderSize); err = errorCon(ERR_TOO_BIG, HTTP_REQUEST_ENTITY_TOO_LARGE); http = parseHttpRequestAbort(conn, "error:request-too-large"); /* add to the client request queue */ diff --git a/src/comm.cc b/src/comm.cc index 7cc1d42102..8fc67ddb81 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -1,6 +1,6 @@ /* - * $Id: comm.cc,v 1.323 2001/10/19 22:34:49 hno Exp $ + * $Id: comm.cc,v 1.324 2001/10/24 07:45:34 hno Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived @@ -865,8 +865,8 @@ commHandleWrite(int fd, void *data) int len = 0; int nleft; - debug(5, 5) ("commHandleWrite: FD %d: off %d, sz %d.\n", - fd, (int) state->offset, state->size); + debug(5, 5) ("commHandleWrite: FD %d: off %ld, sz %ld.\n", + fd, (long int) state->offset, (long int) state->size); nleft = state->size - state->offset; len = FD_WRITE_METHOD(fd, state->buf + state->offset, nleft); diff --git a/src/dns_internal.cc b/src/dns_internal.cc index 2e74276560..91a74ce8b6 100644 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -1,6 +1,6 @@ /* - * $Id: dns_internal.cc,v 1.43 2001/10/24 06:16:16 hno Exp $ + * $Id: dns_internal.cc,v 1.44 2001/10/24 07:45:34 hno Exp $ * * DEBUG: section 78 DNS lookups; interacts with lib/rfc1035.c * AUTHOR: Duane Wessels @@ -335,7 +335,7 @@ idnsStats(StoreEntry * sentry) for (n = lru_list.head; n; n = n->next) { q = n->data; storeAppendPrintf(sentry, "%#06x %4d %5d %10.3f %9.3f\n", - (int) q->id, q->sz, q->nsends, + (int) q->id, (int) q->sz, q->nsends, tvSubDsec(q->start_t, current_time), tvSubDsec(q->sent_t, current_time)); } @@ -520,7 +520,7 @@ idnsRead(int fd, void *data) (*N)++; debug(78, 3) ("idnsRead: FD %d: received %d bytes from %s.\n", fd, - len, + (int) len, inet_ntoa(from.sin_addr)); ns = idnsFromKnownNameserver(&from); if (ns >= 0) { diff --git a/src/errorpage.cc b/src/errorpage.cc index 3c13005ff6..a459de376e 100644 --- a/src/errorpage.cc +++ b/src/errorpage.cc @@ -1,6 +1,6 @@ /* - * $Id: errorpage.cc,v 1.166 2001/08/29 14:57:34 robertc Exp $ + * $Id: errorpage.cc,v 1.167 2001/10/24 07:45:34 hno Exp $ * * DEBUG: section 4 Error Generation * AUTHOR: Duane Wessels @@ -345,7 +345,7 @@ static void errorSendComplete(int fd, char *bufnotused, size_t size, int errflag, void *data) { ErrorState *err = data; - debug(4, 3) ("errorSendComplete: FD %d, size=%d\n", fd, size); + debug(4, 3) ("errorSendComplete: FD %d, size=%ld\n", fd, (long int) size); if (errflag != COMM_ERR_CLOSING) { if (err->callback) { debug(4, 3) ("errorSendComplete: callback\n"); diff --git a/src/filemap.cc b/src/filemap.cc index 01b7704cf7..9ed083dc56 100644 --- a/src/filemap.cc +++ b/src/filemap.cc @@ -1,6 +1,6 @@ /* - * $Id: filemap.cc,v 1.38 2001/01/12 00:37:17 wessels Exp $ + * $Id: filemap.cc,v 1.39 2001/10/24 07:45:34 hno Exp $ * * DEBUG: section 8 Swap File Bitmap * AUTHOR: Harvest Derived @@ -63,7 +63,7 @@ file_map_create(void) fm->nwords = fm->max_n_files >> LONG_BIT_SHIFT; debug(8, 3) ("file_map_create: creating space for %d files\n", fm->max_n_files); debug(8, 5) ("--> %d words of %d bytes each\n", - fm->nwords, sizeof(*fm->file_map)); + fm->nwords, (int) sizeof(*fm->file_map)); fm->file_map = xcalloc(fm->nwords, sizeof(*fm->file_map)); /* XXX account fm->file_map */ return fm; diff --git a/src/fs/aufs/store_dir_aufs.cc b/src/fs/aufs/store_dir_aufs.cc index 28bd3a087c..8d436669bf 100644 --- a/src/fs/aufs/store_dir_aufs.cc +++ b/src/fs/aufs/store_dir_aufs.cc @@ -1,6 +1,6 @@ /* - * $Id: store_dir_aufs.cc,v 1.38 2001/10/17 15:00:54 hno Exp $ + * $Id: store_dir_aufs.cc,v 1.39 2001/10/24 07:45:37 hno Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -471,8 +471,8 @@ storeAufsDirRebuildFromDirectory(void *data) } else if (tmpe.swap_file_sz == sb.st_size - swap_hdr_len) { tmpe.swap_file_sz = sb.st_size; } else if (tmpe.swap_file_sz != sb.st_size) { - debug(20, 1) ("storeAufsDirRebuildFromDirectory: SIZE MISMATCH %d!=%d\n", - tmpe.swap_file_sz, (int) sb.st_size); + debug(20, 1) ("storeAufsDirRebuildFromDirectory: SIZE MISMATCH %ld!=%ld\n", + (long int) tmpe.swap_file_sz, (long int) sb.st_size); storeAufsDirUnlinkFile(SD, filn); continue; } @@ -687,7 +687,7 @@ storeAufsDirRebuildFromSwapLog(void *data) } static int -storeAufsDirGetNextFile(RebuildState * rb, sfileno *filn_p, int *size) +storeAufsDirGetNextFile(RebuildState * rb, sfileno * filn_p, int *size) { SwapDir *SD = rb->sd; squidaioinfo_t *aioinfo = (squidaioinfo_t *) SD->fsdata; @@ -1604,8 +1604,8 @@ storeAufsCleanupDoubleCheck(SwapDir * sd, StoreEntry * e) debug(20, 0) ("storeAufsCleanupDoubleCheck: FILENO %08X\n", e->swap_filen); debug(20, 0) ("storeAufsCleanupDoubleCheck: PATH %s\n", storeAufsDirFullPath(sd, e->swap_filen, NULL)); - debug(20, 0) ("storeAufsCleanupDoubleCheck: ENTRY SIZE: %d, FILE SIZE: %d\n", - e->swap_file_sz, (int) sb.st_size); + debug(20, 0) ("storeAufsCleanupDoubleCheck: ENTRY SIZE: %ld, FILE SIZE: %ld\n", + (long int) e->swap_file_sz, (long int) sb.st_size); storeEntryDump(e, 0); return -1; } diff --git a/src/fs/aufs/store_io_aufs.cc b/src/fs/aufs/store_io_aufs.cc index 9a7dec0337..eaacb0c452 100644 --- a/src/fs/aufs/store_io_aufs.cc +++ b/src/fs/aufs/store_io_aufs.cc @@ -248,8 +248,8 @@ storeAufsKickWriteQueue(storeIOState * sio) struct _queued_write *q = linklistShift(&aiostate->pending_writes); if (NULL == q) return 0; - debug(78, 3) ("storeAufsKickWriteQueue: writing queued chunk of %d bytes\n", - q->size); + debug(78, 3) ("storeAufsKickWriteQueue: writing queued chunk of %ld bytes\n", + (long int) q->size); storeAufsWrite(INDEXSD(sio->swap_dirn), sio, q->buf, q->size, q->offset, q->free_func); memPoolFree(aufs_qwrite_pool, q); return 1; @@ -262,8 +262,8 @@ storeAufsKickReadQueue(storeIOState * sio) struct _queued_read *q = linklistShift(&(aiostate->pending_reads)); if (NULL == q) return 0; - debug(78, 3) ("storeAufsKickReadQueue: reading queued request of %d bytes\n", - q->size); + debug(78, 3) ("storeAufsKickReadQueue: reading queued request of %ld bytes\n", + (long int) q->size); storeAufsRead(INDEXSD(sio->swap_dirn), sio, q->buf, q->size, q->offset, q->callback, q->callback_data); memPoolFree(aufs_qread_pool, q); return 1; @@ -354,8 +354,8 @@ storeAufsWriteDone(int fd, int errflag, size_t len, void *my_data) static int loop_detect = 0; storeIOState *sio = my_data; squidaiostate_t *aiostate = (squidaiostate_t *) sio->fsstate; - debug(78, 3) ("storeAufsWriteDone: dirno %d, fileno %08X, FD %d, len %d, err=%d\n", - sio->swap_dirn, sio->swap_filen, fd, len, errflag); + debug(78, 3) ("storeAufsWriteDone: dirno %d, fileno %08X, FD %d, len %ld, err=%d\n", + sio->swap_dirn, sio->swap_filen, fd, (long int) len, errflag); #if ASYNC_WRITE /* Translate from errno to Squid disk error */ errno = errflag; diff --git a/src/fs/coss/store_io_coss.cc b/src/fs/coss/store_io_coss.cc index 0675aeebf8..04bceb1cbe 100644 --- a/src/fs/coss/store_io_coss.cc +++ b/src/fs/coss/store_io_coss.cc @@ -1,6 +1,6 @@ /* - * $Id: store_io_coss.cc,v 1.12 2001/10/24 05:26:22 hno Exp $ + * $Id: store_io_coss.cc,v 1.13 2001/10/24 07:45:37 hno Exp $ * * DEBUG: section 81 Storage Manager COSS Interface * AUTHOR: Eric Stern @@ -109,8 +109,8 @@ storeCossAllocate(SwapDir * SD, const StoreEntry * e, int which) */ cs->current_membuf->flags.full = 1; cs->current_offset = cs->current_membuf->diskend + 1; - debug(81, 2) ("storeCossAllocate: New offset - %d\n", - cs->current_offset); + debug(81, 2) ("storeCossAllocate: New offset - %ld\n", + (long int) cs->current_offset); newmb = storeCossCreateMemBuf(SD, cs->current_offset, checkf, &coll); cs->current_membuf = newmb; } @@ -159,7 +159,7 @@ storeCossCreate(SwapDir * SD, StoreEntry * e, STFNCB * file_callback, STIOCB * c sio->st_size = objectLen(e) + e->mem_obj->swap_hdr_sz; sio->swap_dirn = SD->index; sio->swap_filen = storeCossAllocate(SD, e, COSS_ALLOC_ALLOCATE); - debug(81, 3) ("storeCossCreate: offset %d, size %d, end %d\n", sio->swap_filen, sio->st_size, sio->swap_filen + sio->st_size); + debug(81, 3) ("storeCossCreate: offset %d, size %ld, end %ld\n", sio->swap_filen, (long int) sio->st_size, (long int) (sio->swap_filen + sio->st_size)); sio->callback = callback; sio->file_callback = file_callback; @@ -282,7 +282,7 @@ storeCossRead(SwapDir * SD, storeIOState * sio, char *buf, size_t size, off_t of assert(sio->read.callback_data == NULL); sio->read.callback = callback; sio->read.callback_data = callback_data; - debug(81, 3) ("storeCossRead: offset %ld\n", (long int)offset); + debug(81, 3) ("storeCossRead: offset %ld\n", (long int) offset); sio->offset = offset; cstate->flags.reading = 1; if ((offset + size) > sio->st_size) @@ -322,7 +322,7 @@ storeCossWrite(SwapDir * SD, storeIOState * sio, char *buf, size_t size, off_t o */ assert(sio->e->mem_obj->object_sz != -1); - debug(81, 3) ("storeCossWrite: offset %ld, len %lu\n", (long int)sio->offset, (unsigned long int)size); + debug(81, 3) ("storeCossWrite: offset %ld, len %lu\n", (long int) sio->offset, (unsigned long int) size); diskoffset = sio->swap_filen + sio->offset; dest = storeCossMemPointerFromDiskOffset(SD, diskoffset, &membuf); assert(dest != NULL); @@ -476,8 +476,8 @@ static void storeCossWriteMemBuf(SwapDir * SD, CossMemBuf * t) { CossInfo *cs = (CossInfo *) SD->fsdata; - debug(81, 3) ("storeCossWriteMemBuf: offset %d, len %d\n", - t->diskstart, t->diskend - t->diskstart); + debug(81, 3) ("storeCossWriteMemBuf: offset %ld, len %ld\n", + (long int) t->diskstart, (long int) (t->diskend - t->diskstart)); t->flags.writing = 1; /* Remember that diskstart/diskend are block offsets! */ a_file_write(&cs->aq, cs->fd, t->diskstart, &t->buffer, @@ -491,7 +491,7 @@ storeCossWriteMemBufDone(int fd, int errflag, size_t len, void *my_data) CossMemBuf *t = my_data; CossInfo *cs = (CossInfo *) t->SD->fsdata; - debug(81, 3) ("storeCossWriteMemBufDone: buf %p, len %ld\n", t, (long int)len); + debug(81, 3) ("storeCossWriteMemBufDone: buf %p, len %ld\n", t, (long int) len); if (errflag) debug(81, 0) ("storeCossMemBufWriteDone: got failure (%d)\n", errflag); @@ -512,7 +512,7 @@ storeCossCreateMemBuf(SwapDir * SD, size_t start, CBDATA_INIT_TYPE_FREECB(CossMemBuf, NULL); newmb = cbdataAlloc(CossMemBuf); newmb->diskstart = start; - debug(81, 3) ("storeCossCreateMemBuf: creating new membuf at %d\n", newmb->diskstart); + debug(81, 3) ("storeCossCreateMemBuf: creating new membuf at %ld\n", (long int) newmb->diskstart); debug(81, 3) ("storeCossCreateMemBuf: at %p\n", newmb); newmb->diskend = newmb->diskstart + COSS_MEMBUF_SZ - 1; newmb->flags.full = 0; @@ -525,7 +525,7 @@ storeCossCreateMemBuf(SwapDir * SD, size_t start, /* Print out the list of membufs */ for (m = cs->membufs.head; m; m = m->next) { t = m->data; - debug(81, 3) ("storeCossCreateMemBuf: membuflist %d lockcount %d\n", t->diskstart, t->lockcount); + debug(81, 3) ("storeCossCreateMemBuf: membuflist %ld lockcount %d\n", (long int) t->diskstart, t->lockcount); } /* diff --git a/src/fs/diskd/store_dir_diskd.cc b/src/fs/diskd/store_dir_diskd.cc index 839c8574aa..b1fb78a18d 100644 --- a/src/fs/diskd/store_dir_diskd.cc +++ b/src/fs/diskd/store_dir_diskd.cc @@ -1,6 +1,6 @@ /* - * $Id: store_dir_diskd.cc,v 1.56 2001/10/17 19:33:06 hno Exp $ + * $Id: store_dir_diskd.cc,v 1.57 2001/10/24 07:45:38 hno Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -636,8 +636,8 @@ storeDiskdDirRebuildFromDirectory(void *data) } else if (tmpe.swap_file_sz == sb.st_size - swap_hdr_len) { tmpe.swap_file_sz = sb.st_size; } else if (tmpe.swap_file_sz != sb.st_size) { - debug(20, 1) ("storeDiskdDirRebuildFromDirectory: SIZE MISMATCH %d!=%d\n", - tmpe.swap_file_sz, (int) sb.st_size); + debug(20, 1) ("storeDiskdDirRebuildFromDirectory: SIZE MISMATCH %ld!=%ld\n", + (long int) tmpe.swap_file_sz, (long int) sb.st_size); storeDiskdDirUnlinkFile(SD, filn); continue; } @@ -877,7 +877,7 @@ storeDiskdDirRebuildFromSwapLog(void *data) } static int -storeDiskdDirGetNextFile(RebuildState * rb, sfileno *filn_p, int *size) +storeDiskdDirGetNextFile(RebuildState * rb, sfileno * filn_p, int *size) { SwapDir *SD = rb->sd; diskdinfo_t *diskdinfo = SD->fsdata; @@ -1863,8 +1863,8 @@ storeDiskdCleanupDoubleCheck(SwapDir * sd, StoreEntry * e) debug(20, 0) ("storeDiskdCleanupDoubleCheck: FILENO %08X\n", e->swap_filen); debug(20, 0) ("storeDiskdCleanupDoubleCheck: PATH %s\n", storeDiskdDirFullPath(sd, e->swap_filen, NULL)); - debug(20, 0) ("storeDiskdCleanupDoubleCheck: ENTRY SIZE: %d, FILE SIZE: %d\n", - e->swap_file_sz, (int) sb.st_size); + debug(20, 0) ("storeDiskdCleanupDoubleCheck: ENTRY SIZE: %ld, FILE SIZE: %ld\n", + (long int) e->swap_file_sz, (long int) sb.st_size); storeEntryDump(e, 0); return -1; } diff --git a/src/fs/ufs/store_dir_ufs.cc b/src/fs/ufs/store_dir_ufs.cc index 4b552466d1..5511aaa527 100644 --- a/src/fs/ufs/store_dir_ufs.cc +++ b/src/fs/ufs/store_dir_ufs.cc @@ -1,6 +1,6 @@ /* - * $Id: store_dir_ufs.cc,v 1.37 2001/10/24 06:55:45 hno Exp $ + * $Id: store_dir_ufs.cc,v 1.38 2001/10/24 07:45:38 hno Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -471,7 +471,7 @@ storeUfsDirRebuildFromDirectory(void *data) tmpe.swap_file_sz = sb.st_size; } else if (tmpe.swap_file_sz != sb.st_size) { debug(20, 1) ("storeUfsDirRebuildFromDirectory: SIZE MISMATCH %ld!=%ld\n", - (long int)tmpe.swap_file_sz, (long int) sb.st_size); + (long int) tmpe.swap_file_sz, (long int) sb.st_size); storeUfsDirUnlinkFile(SD, filn); continue; } @@ -686,7 +686,7 @@ storeUfsDirRebuildFromSwapLog(void *data) } static int -storeUfsDirGetNextFile(RebuildState * rb, sfileno *filn_p, int *size) +storeUfsDirGetNextFile(RebuildState * rb, sfileno * filn_p, int *size) { SwapDir *SD = rb->sd; ufsinfo_t *ufsinfo = (ufsinfo_t *) SD->fsdata; @@ -1588,7 +1588,7 @@ storeUfsCleanupDoubleCheck(SwapDir * sd, StoreEntry * e) debug(20, 0) ("storeUfsCleanupDoubleCheck: PATH %s\n", storeUfsDirFullPath(sd, e->swap_filen, NULL)); debug(20, 0) ("storeUfsCleanupDoubleCheck: ENTRY SIZE: %ld, FILE SIZE: %ld\n", - (long int)e->swap_file_sz, (long int) sb.st_size); + (long int) e->swap_file_sz, (long int) sb.st_size); storeEntryDump(e, 0); return -1; } diff --git a/src/fs/ufs/store_io_ufs.cc b/src/fs/ufs/store_io_ufs.cc index 704316cb13..1ae035da8f 100644 --- a/src/fs/ufs/store_io_ufs.cc +++ b/src/fs/ufs/store_io_ufs.cc @@ -1,6 +1,6 @@ /* - * $Id: store_io_ufs.cc,v 1.8 2001/10/24 06:55:45 hno Exp $ + * $Id: store_io_ufs.cc,v 1.9 2001/10/24 07:45:38 hno Exp $ * * DEBUG: section 79 Storage Manager UFS Interface * AUTHOR: Duane Wessels @@ -228,7 +228,7 @@ storeUfsWriteDone(int fd, int errflag, size_t len, void *my_data) storeIOState *sio = my_data; ufsstate_t *ufsstate = (ufsstate_t *) sio->fsstate; debug(79, 3) ("storeUfsWriteDone: dirno %d, fileno %08X, FD %d, len %ld\n", - sio->swap_dirn, sio->swap_filen, fd, (long int)len); + sio->swap_dirn, sio->swap_filen, fd, (long int) len); ufsstate->flags.writing = 0; if (errflag) { debug(79, 0) ("storeUfsWriteDone: got failure (%d)\n", errflag); diff --git a/src/ftp.cc b/src/ftp.cc index c4b32bc271..76c1876e46 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -1,6 +1,6 @@ /* - * $Id: ftp.cc,v 1.314 2001/10/24 06:16:16 hno Exp $ + * $Id: ftp.cc,v 1.315 2001/10/24 07:45:34 hno Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived @@ -799,7 +799,7 @@ ftpParseListing(FtpStateData * ftpState) while (*end != '\r' && *end != '\n' && end > sbuf) end--; usable = end - sbuf; - debug(9, 3) ("ftpParseListing: usable = %d\n", usable); + debug(9, 3) ("ftpParseListing: usable = %d\n", (int) usable); if (usable == 0) { debug(9, 3) ("ftpParseListing: didn't find end for %s\n", storeUrl(e)); xfree(sbuf); @@ -1126,7 +1126,7 @@ static void ftpWriteCommandCallback(int fd, char *bufnotused, size_t size, int errflag, void *data) { FtpStateData *ftpState = data; - debug(9, 7) ("ftpWriteCommandCallback: wrote %d bytes\n", size); + debug(9, 7) ("ftpWriteCommandCallback: wrote %d bytes\n", (int) size); if (size > 0) { fd_bytes(fd, size, FD_WRITE); kb_incr(&statCounter.server.all.kbytes_out, size); @@ -1172,7 +1172,7 @@ ftpParseControlReply(char *buf, size_t len, int *codep, int *used) safe_free(sbuf); return NULL; } - debug(9, 3) ("ftpParseControlReply: %d bytes to play with\n", len); + debug(9, 3) ("ftpParseControlReply: %d bytes to play with\n", (int) len); end++; s = sbuf; s += strspn(s, crlf); @@ -2189,7 +2189,7 @@ static void ftpRequestBody(char *buf, size_t size, void *data) { FtpStateData *ftpState = (FtpStateData *) data; - debug(9, 3) ("ftpRequestBody: buf=%p size=%d ftpState=%p\n", buf, size, data); + debug(9, 3) ("ftpRequestBody: buf=%p size=%d ftpState=%p\n", buf, (int) size, data); ftpState->data.offset = size; if (size > 0) { /* DataWrite */ diff --git a/src/gopher.cc b/src/gopher.cc index 7bfe50a615..16b032678e 100644 --- a/src/gopher.cc +++ b/src/gopher.cc @@ -1,6 +1,6 @@ /* - * $Id: gopher.cc,v 1.161 2001/04/14 00:03:22 hno Exp $ + * $Id: gopher.cc,v 1.162 2001/10/24 07:45:35 hno Exp $ * * DEBUG: section 10 Gopher * AUTHOR: Harvest Derived @@ -682,7 +682,7 @@ gopherSendComplete(int fd, char *buf, size_t size, int errflag, void *data) GopherStateData *gopherState = (GopherStateData *) data; StoreEntry *entry = gopherState->entry; debug(10, 5) ("gopherSendComplete: FD %d size: %d errflag: %d\n", - fd, size, errflag); + fd, (int) size, errflag); if (size > 0) { fd_bytes(fd, size, FD_WRITE); kb_incr(&statCounter.server.all.kbytes_out, size); diff --git a/src/helper.cc b/src/helper.cc index 67c3e90047..ac7d4fb607 100644 --- a/src/helper.cc +++ b/src/helper.cc @@ -1,6 +1,6 @@ /* - * $Id: helper.cc,v 1.32 2001/10/24 06:16:16 hno Exp $ + * $Id: helper.cc,v 1.33 2001/10/24 07:45:35 hno Exp $ * * DEBUG: section 29 Helper process maintenance * AUTHOR: Harvest Derived? @@ -482,7 +482,7 @@ helperStatefulStats(StoreEntry * sentry, statefulhelper * hlp) srv->rfd, srv->pid, srv->stats.uses, - srv->deferred_requests, + (int) srv->deferred_requests, srv->flags.alive ? 'A' : ' ', srv->flags.busy ? 'B' : ' ', srv->flags.closing ? 'C' : ' ', @@ -1014,7 +1014,7 @@ helperDispatch(helper_server * srv, helper_request * r) helperHandleRead, srv, 0); debug(29, 5) ("helperDispatch: Request sent to %s #%d, %d bytes\n", - hlp->id_name, srv->index + 1, strlen(r->buf)); + hlp->id_name, srv->index + 1, (int) strlen(r->buf)); srv->stats.uses++; hlp->stats.requests++; } @@ -1067,7 +1067,7 @@ helperStatefulDispatch(helper_stateful_server * srv, helper_stateful_request * r helperStatefulHandleRead, srv, 0); debug(29, 5) ("helperStatefulDispatch: Request sent to %s #%d, %d bytes\n", - hlp->id_name, srv->index + 1, strlen(r->buf)); + hlp->id_name, srv->index + 1, (int) strlen(r->buf)); srv->stats.uses++; hlp->stats.requests++; } diff --git a/src/structs.h b/src/structs.h index 6f2a1ee7b4..8bf225269d 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1,6 +1,6 @@ /* - * $Id: structs.h,v 1.406 2001/10/19 22:34:49 hno Exp $ + * $Id: structs.h,v 1.407 2001/10/24 07:45:35 hno Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -2081,7 +2081,7 @@ struct _helper_stateful_server { int deferbyfunc; int deferbycb; } stats; - size_t deferred_requests; /* current number of deferred requests */ + int deferred_requests; /* current number of deferred requests */ void *data; /* State data used by the calling routines */ }; -- 2.47.2