From: hno <> Date: Wed, 24 Oct 2001 11:46:26 +0000 (+0000) Subject: format error fixes X-Git-Tag: SQUID_3_0_PRE1~1324 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=04bd8d2515b04edf0fa92d387bf6ac5e8f857c7b;p=thirdparty%2Fsquid.git format error fixes --- diff --git a/src/acl.cc b/src/acl.cc index 18a6f790bd..7989debb19 100644 --- a/src/acl.cc +++ b/src/acl.cc @@ -1,6 +1,6 @@ /* - * $Id: acl.cc,v 1.266 2001/10/23 12:14:48 hno Exp $ + * $Id: acl.cc,v 1.267 2001/10/24 05:46:26 hno Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -1102,7 +1102,7 @@ aclMatchUser(void *proxyauth_acl, char *user) debug(28, 7) ("aclMatchUser: user is %s, case_insensitive is %d\n", user, data->flags.case_insensitive); debug(28, 8) ("Top is %p, Top->data is %s\n", Top, - (Top != NULL ? (Top)->data : "Unavailable")); + (char *)(Top != NULL ? (Top)->data : "Unavailable")); if (user == NULL) return 0; @@ -1117,7 +1117,7 @@ aclMatchUser(void *proxyauth_acl, char *user) Top = splay_splay(user, Top, (SPLAYCMP *) strcmp); /* Top=splay_splay(user,Top,(SPLAYCMP *)dumping_strcmp); */ debug(28, 7) ("aclMatchUser: returning %d,Top is %p, Top->data is %s\n", - !splayLastResult, Top, (Top ? Top->data : "Unavailable")); + !splayLastResult, Top, (char *)(Top ? Top->data : "Unavailable")); data->names = Top; return !splayLastResult; } @@ -1149,7 +1149,7 @@ aclCacheMatchAcl(dlink_list * cache, squid_acl acltype, void *data, while (link) { auth_match = link->data; if (auth_match->acl_data == data) { - debug(28, 4) ("aclCacheMatchAcl: cache hit on acl '%d'\n", data); + debug(28, 4) ("aclCacheMatchAcl: cache hit on acl '%p'\n", data); return auth_match->matchrv; } link = link->next; @@ -1264,7 +1264,7 @@ aclDumpUserMaxIP(void *data) char buf[128]; if (acldata->flags.strict) wordlistAdd(&W, "-s"); - snprintf(buf, sizeof(buf), "%ld", acldata->max); + snprintf(buf, sizeof(buf), "%lu", (unsigned long int)acldata->max); wordlistAdd(&W, buf); return W; } @@ -2194,7 +2194,7 @@ aclDomainCompare(const void *a, const void *b) } if (ret == 0) { debug(28, 0) ("WARNING: '%s' is a subdomain of '%s'\n", d1, d2); - debug(28, 0) ("WARNING: because of this '%s' is ignored to keep splay tree searching predictable\n", a); + debug(28, 0) ("WARNING: because of this '%s' is ignored to keep splay tree searching predictable\n", (char *)a); debug(28, 0) ("WARNING: You should probably remove '%s' from the ACL named '%s'\n", d1, AclMatchedName); } return ret; diff --git a/src/asn.cc b/src/asn.cc index 0ac9f2b167..d562fab8e4 100644 --- a/src/asn.cc +++ b/src/asn.cc @@ -1,6 +1,6 @@ /* - * $Id: asn.cc,v 1.74 2001/10/17 19:43:39 hno Exp $ + * $Id: asn.cc,v 1.75 2001/10/24 05:46:26 hno Exp $ * * DEBUG: section 53 AS Number handling * AUTHOR: Duane Wessels, Kostas Anagnostakis @@ -264,8 +264,8 @@ asHandleReply(void *data, char *buf, ssize_t size) } asState->seen = asState->offset + size; asState->offset += (s - buf); - debug(53, 3) ("asState->seen = %d, asState->offset = %d\n", - asState->seen, asState->offset); + debug(53, 3) ("asState->seen = %ld, asState->offset = %ld\n", + (long int)asState->seen, (long int)asState->offset); if (e->store_status == STORE_PENDING) { debug(53, 3) ("asHandleReply: store_status == STORE_PENDING: %s\n", storeUrl(e)); storeClientCopy(asState->sc, diff --git a/src/authenticate.cc b/src/authenticate.cc index 5464b3af17..d9681d65d3 100644 --- a/src/authenticate.cc +++ b/src/authenticate.cc @@ -1,6 +1,6 @@ /* - * $Id: authenticate.cc,v 1.31 2001/10/17 20:25:01 hno Exp $ + * $Id: authenticate.cc,v 1.32 2001/10/24 05:46:26 hno Exp $ * * DEBUG: section 29 Authenticator * AUTHOR: Duane Wessels @@ -467,7 +467,7 @@ authenticateAuthenticate(auth_user_request_t ** auth_user_request, http_hdr_type if (proxy_auth && conn->auth_user_request && authenticateUserAuthenticated(conn->auth_user_request) && strcmp(proxy_auth, authscheme_list[conn->auth_user_request->auth_user->auth_module - 1].authConnLastHeader(conn->auth_user_request))) { - debug(28, 2) ("authenticateAuthenticate: DUPLICATE AUTH - authentication header on already authenticated connection!. AU %x, Current user '%s' proxy_auth %s\n", conn->auth_user_request, authenticateUserRequestUsername(conn->auth_user_request), proxy_auth); + debug(28, 2) ("authenticateAuthenticate: DUPLICATE AUTH - authentication header on already authenticated connection!. AU %p, Current user '%s' proxy_auth %s\n", conn->auth_user_request, authenticateUserRequestUsername(conn->auth_user_request), proxy_auth); /* remove this request struct - the link is already authed and it can't be to * reauth. */ @@ -519,7 +519,7 @@ authenticateAuthenticate(auth_user_request_t ** auth_user_request, http_hdr_type authenticateAuthUserRequestLock(*auth_user_request); } else { /* failed connection based authentication */ - debug(28, 4) ("authenticateAuthenticate: Auth user request %d conn-auth user request %d conn type %d authentication failed.\n", + debug(28, 4) ("authenticateAuthenticate: Auth user request %p conn-auth user request %p conn type %d authentication failed.\n", *auth_user_request, conn->auth_user_request, conn->auth_type); authenticateAuthUserRequestUnlock(*auth_user_request); *auth_user_request = NULL; @@ -883,7 +883,7 @@ authenticateProxyUserCacheCleanup(void *datanotused) auth_user_t *auth_user; char *username = NULL; debug(29, 3) ("authenticateProxyUserCacheCleanup: Cleaning the user cache now\n"); - debug(29, 3) ("authenticateProxyUserCacheCleanup: Current time: %d\n", current_time.tv_sec); + debug(29, 3) ("authenticateProxyUserCacheCleanup: Current time: %ld\n", (long int)current_time.tv_sec); hash_first(proxy_auth_username_cache); while ((usernamehash = ((auth_user_hash_pointer *) hash_next(proxy_auth_username_cache)))) { auth_user = usernamehash->auth_user; @@ -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: %d\n\treferences: %d\n", auth_user->auth_type, username, 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: %d\n", auth_user->auth_type, username, (long int)(auth_user->expiretime + Config.authenticateTTL), 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 ab24b84f95..ed58b0813f 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1,6 +1,6 @@ /* - * $Id: cache_cf.cc,v 1.394 2001/10/19 22:34:48 hno Exp $ + * $Id: cache_cf.cc,v 1.395 2001/10/24 05:46:26 hno Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -408,8 +408,7 @@ configDoConfigure(void) * during reconfigure. */ fatalf("getpwnam failed to find userid for effective user '%s'", - Config.effectiveUser, - xstrerror()); + Config.effectiveUser); Config2.effectiveUserID = pwd->pw_uid; Config2.effectiveGroupID = pwd->pw_gid; } @@ -421,8 +420,7 @@ configDoConfigure(void) struct group *grp = getgrnam(Config.effectiveGroup); if (NULL == grp) fatalf("getgrnam failed to find groupid for effective group '%s'", - Config.effectiveGroup, - xstrerror()); + Config.effectiveGroup); Config2.effectiveGroupID = grp->gr_gid; } urlExtMethodConfigure(); @@ -1262,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", size); + debug(3, 1) ("Cache dir '%s' max object size now %d\n", sd->path, size); sd->max_objsize = size; } diff --git a/src/client_side.cc b/src/client_side.cc index 3f597985a1..ab5c3cad98 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.552 2001/10/24 02:25:08 hno Exp $ + * $Id: client_side.cc,v 1.553 2001/10/24 05:46:27 hno Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -2978,7 +2978,7 @@ clientReadBody(request_t * request, char *buf, size_t size, CBCB * callback, voi callback(buf, 0, cbdata); /* Signal end of body */ return; } - debug(33, 2) ("clientReadBody: start fd=%d body_size=%d in.offset=%d cb=%p req=%p\n", conn->fd, conn->body.size_left, conn->in.offset, callback, request); + debug(33, 2) ("clientReadBody: start fd=%d body_size=%lu in.offset=%ld cb=%p req=%p\n", conn->fd, (unsigned long int)conn->body.size_left, (long int)conn->in.offset, callback, request); conn->body.callback = callback; conn->body.cbdata = cbdata; conn->body.buf = buf; @@ -2997,7 +2997,7 @@ clientProcessBody(ConnStateData * conn) CBCB *callback = conn->body.callback; request_t *request = conn->body.request; /* Note: request is null while eating "aborted" transfers */ - debug(33, 2) ("clientProcessBody: start fd=%d body_size=%d in.offset=%d cb=%p req=%p\n", conn->fd, conn->body.size_left, conn->in.offset, callback, request); + debug(33, 2) ("clientProcessBody: start fd=%d body_size=%lu in.offset=%ld cb=%p req=%p\n", conn->fd, (unsigned long int)conn->body.size_left, (long int)conn->in.offset, callback, request); if (conn->in.offset) { /* Some sanity checks... */ assert(conn->body.size_left > 0); @@ -3032,7 +3032,7 @@ clientProcessBody(ConnStateData * conn) callback(buf, size, cbdata); if (request != NULL) requestUnlink(request); /* Linked in clientReadBody */ - debug(33, 2) ("clientProcessBody: end fd=%d size=%d body_size=%d in.offset=%d cb=%p req=%p\n", conn->fd, size, conn->body.size_left, conn->in.offset, callback, request); + debug(33, 2) ("clientProcessBody: end fd=%d size=%d body_size=%lu in.offset=%ld cb=%p req=%p\n", conn->fd, size, (unsigned long int)conn->body.size_left, (long int)conn->in.offset, callback, request); } } @@ -3042,7 +3042,7 @@ static void clientReadBodyAbortHandler(char *buf, size_t size, void *data) { ConnStateData *conn = (ConnStateData *) data; - debug(33, 2) ("clientReadBodyAbortHandler: fd=%d body_size=%d in.offset=%d\n", conn->fd, conn->body.size_left, conn->in.offset); + debug(33, 2) ("clientReadBodyAbortHandler: fd=%d body_size=%lu in.offset=%ld\n", conn->fd, (unsigned long int)conn->body.size_left, (long int)conn->in.offset); if (size != 0 && conn->body.size_left != 0) { debug(33, 3) ("clientReadBodyAbortHandler: fd=%d shedule next read\n", conn->fd); conn->body.callback = clientReadBodyAbortHandler;