From: wessels <> Date: Tue, 17 Mar 1998 03:11:50 +0000 (+0000) Subject: eliminate non-gcc compiler warnings X-Git-Tag: SQUID_3_0_PRE1~3837 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e29a294eb24198180ea1694baf6bc73fd7f1f7b;p=thirdparty%2Fsquid.git eliminate non-gcc compiler warnings --- diff --git a/src/cf_gen.cc b/src/cf_gen.cc index 693cad0e4c..793da5e82e 100644 --- a/src/cf_gen.cc +++ b/src/cf_gen.cc @@ -1,5 +1,5 @@ /* - * $Id: cf_gen.cc,v 1.20 1998/02/10 22:17:53 wessels Exp $ + * $Id: cf_gen.cc,v 1.21 1998/03/16 20:11:50 wessels Exp $ * * DEBUG: none * AUTHOR: Max Okumoto @@ -440,7 +440,7 @@ gen_dump(Entry * head, FILE * fp) { Entry *entry; fprintf(fp, - "void\n" + "static void\n" "dump_config(StoreEntry *entry)\n" "{\n" ); diff --git a/src/http.cc b/src/http.cc index bf4c6c4a33..73e53ae52f 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1,6 +1,6 @@ /* - * $Id: http.cc,v 1.253 1998/03/16 17:03:26 wessels Exp $ + * $Id: http.cc,v 1.254 1998/03/16 20:11:51 wessels Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -125,7 +125,7 @@ enum { static CNCB httpConnectDone; static CWCB httpSendComplete; -static void *sendHeaderDone; +static CWCB *sendHeaderDone; static CWCB httpSendRequestEntry; static PF httpReadReply; diff --git a/src/snmp_agent.cc b/src/snmp_agent.cc index 6b17a96099..069a5d9e1f 100644 --- a/src/snmp_agent.cc +++ b/src/snmp_agent.cc @@ -72,7 +72,7 @@ snmpAclCheckStart(snmp_request_t * rq) { communityEntry *cp; for (cp = Config.Snmp.communities; cp != NULL; cp = cp->next) - if (!strcmp(rq->community, cp->name) && cp->acls) { + if (!strcmp((char *)rq->community, cp->name) && cp->acls) { rq->acl_checklist = aclChecklistCreate(cp->acls, NULL, rq->from.sin_addr, NULL, NULL); aclNBCheck(rq->acl_checklist, snmpAclCheckDone, rq); @@ -111,14 +111,14 @@ snmpAclCheckDone(int answer, void *data) debug(49, 5) ("snmpAclCheckDone: checking.\n"); /* access check for each variable */ - if (!community_check(Community, VarPtr->name, VarPtr->name_length)) { + if (!community_check((char *)Community, VarPtr->name, VarPtr->name_length)) { debug(49, 5) ("snmpAclCheckDone: failed on community_check.\n"); snmp_agent_parse_done(0, rq); return; } } Session->community = Community; - Session->community_len = strlen(Community); + Session->community_len = strlen((char *)Community); RespPDU = snmp_agent_response(PDU); snmp_free_pdu(PDU); if (RespPDU == NULL) { diff --git a/src/stat.cc b/src/stat.cc index 8b33dc3fb9..cc7f5565ce 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -1,6 +1,6 @@ /* - * $Id: stat.cc,v 1.216 1998/03/12 17:51:21 wessels Exp $ + * $Id: stat.cc,v 1.217 1998/03/16 20:11:53 wessels Exp $ * * DEBUG: section 18 Cache Manager Statistics * AUTHOR: Harvest Derived @@ -137,7 +137,7 @@ static int NCountHist = 0; static StatCounters CountHourHist[N_COUNT_HOUR_HIST]; static int NCountHourHist = 0; -void +static void statUtilization(StoreEntry * e) { storeAppendPrintf(e, "Cache Utilisation:\n"); @@ -182,7 +182,7 @@ statUtilization(StoreEntry * e) statCountersDump(e); } -void +static void stat_io_get(StoreEntry * sentry) { int i; @@ -359,13 +359,13 @@ statObjects(StoreEntry * sentry, int vm_or_not) } } -void +static void stat_objects_get(StoreEntry * e) { statObjects(e, 0); } -void +static void stat_vmobjects_get(StoreEntry * e) { statObjects(e, 1); @@ -390,7 +390,7 @@ fdRemoteAddr(const fde * f) return buf; } -void +static void statFiledescriptors(StoreEntry * sentry) { int i; @@ -420,7 +420,7 @@ statFiledescriptors(StoreEntry * sentry) } } -void +static void info_get(StoreEntry * sentry) { struct rusage rusage; @@ -788,7 +788,7 @@ statCountersInitSpecial(StatCounters * C) } /* add special cases here as they arrive */ -void +static void statCountersClean(StatCounters * C) { assert(C); @@ -802,7 +802,7 @@ statCountersClean(StatCounters * C) } /* add special cases here as they arrive */ -void +static void statCountersCopy(StatCounters * dest, const StatCounters * orig) { assert(dest && orig); @@ -922,19 +922,19 @@ statCountersDump(StoreEntry * sentry) tvSubDsec(f->timestamp, current_time)); } -void +static void statCounters(StoreEntry * e) { statCountersDump(e); } -void +static void statAvg5min(StoreEntry * e) { statAvgDump(e, 5, 0); } -void +static void statAvg60min(StoreEntry * e) { statAvgDump(e, 60, 0); diff --git a/src/structs.h b/src/structs.h index 894ea9fa19..a4536ecad3 100644 --- a/src/structs.h +++ b/src/structs.h @@ -61,8 +61,8 @@ struct _snmpconf { }; struct _snmp_request_t { - char *buf; - char *outbuf; + u_char *buf; + u_char *outbuf; int len; int sock; long reqid; @@ -70,7 +70,7 @@ struct _snmp_request_t { struct sockaddr_in from; struct snmp_pdu *PDU; aclCheck_t *acl_checklist; - char *community; + u_char *community; }; typedef struct _viewEntry {