From: wessels <> Date: Sat, 15 Aug 1998 01:25:11 +0000 (+0000) Subject: IRIX compiler warnings X-Git-Tag: SQUID_3_0_PRE1~2898 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=728da2eeefb66458735aa8831f38e92a15652384;p=thirdparty%2Fsquid.git IRIX compiler warnings --- diff --git a/src/HttpReply.cc b/src/HttpReply.cc index ec54059c25..8f0660a789 100644 --- a/src/HttpReply.cc +++ b/src/HttpReply.cc @@ -1,6 +1,6 @@ /* - * $Id: HttpReply.cc,v 1.29 1998/07/22 20:36:49 wessels Exp $ + * $Id: HttpReply.cc,v 1.30 1998/08/14 19:25:11 wessels Exp $ * * DEBUG: section 58 HTTP Reply (Response) * AUTHOR: Alex Rousskov @@ -199,7 +199,7 @@ httpPacked304Reply(const HttpReply * rep) { static const http_hdr_type ImsEntries[] = {HDR_DATE, HDR_CONTENT_LENGTH, HDR_CONTENT_TYPE, HDR_EXPIRES, HDR_LAST_MODIFIED, /* eof */ HDR_OTHER}; - http_hdr_type t; + int t; MemBuf mb; Packer p; HttpHeaderEntry *e; diff --git a/src/HttpStatusLine.cc b/src/HttpStatusLine.cc index 6cd04b0fd5..f5d08fbe78 100644 --- a/src/HttpStatusLine.cc +++ b/src/HttpStatusLine.cc @@ -1,6 +1,6 @@ /* - * $Id: HttpStatusLine.cc,v 1.16 1998/08/10 19:37:47 wessels Exp $ + * $Id: HttpStatusLine.cc,v 1.17 1998/08/14 19:25:12 wessels Exp $ * * DEBUG: section 57 HTTP Status-line * AUTHOR: Alex Rousskov @@ -42,13 +42,13 @@ const char *HttpStatusLineFormat = "HTTP/%3.1f %3d %s\r\n"; void httpStatusLineInit(HttpStatusLine * sline) { - httpStatusLineSet(sline, 0.0, 0, NULL); + httpStatusLineSet(sline, 0.0, HTTP_STATUS_NONE, NULL); } void httpStatusLineClean(HttpStatusLine * sline) { - httpStatusLineSet(sline, 0.0, 500, NULL); + httpStatusLineSet(sline, 0.0, HTTP_INTERNAL_SERVER_ERROR, NULL); } /* set values */ diff --git a/src/acl.cc b/src/acl.cc index 99100c545a..5d3b7d12f9 100644 --- a/src/acl.cc +++ b/src/acl.cc @@ -1,6 +1,6 @@ /* - * $Id: acl.cc,v 1.174 1998/07/31 00:15:33 wessels Exp $ + * $Id: acl.cc,v 1.175 1998/08/14 19:25:13 wessels Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -332,7 +332,6 @@ decode_addr(const char *asc, struct in_addr *addr, struct in_addr *mask) default: debug(28, 0) ("decode_addr: Invalid IP address '%s'\n", asc); return 0; /* This is not valid address */ - break; } if (mask != NULL) { /* mask == NULL if called to decode a netmask */ diff --git a/src/cachemgr.cc b/src/cachemgr.cc index f474791e5d..8ad63b3253 100644 --- a/src/cachemgr.cc +++ b/src/cachemgr.cc @@ -1,6 +1,6 @@ /* - * $Id: cachemgr.cc,v 1.81 1998/07/22 20:37:03 wessels Exp $ + * $Id: cachemgr.cc,v 1.82 1998/08/14 19:25:14 wessels Exp $ * * DEBUG: section 0 CGI Cache Manager * AUTHOR: Duane Wessels @@ -346,8 +346,8 @@ munge_other_line(const char *buf, cachemgr_request * req) static const char *ttags[] = {"td", "th"}; static char html[4096]; - static table_line_num = 0; - static next_is_header = 0; + static int table_line_num = 0; + static int next_is_header = 0; int is_header = 0; const char *ttag; char *buf_copy; diff --git a/src/client_side.cc b/src/client_side.cc index 9cf4a436f9..0fab6a9697 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.376 1998/08/14 09:22:32 wessels Exp $ + * $Id: client_side.cc,v 1.377 1998/08/14 19:25:15 wessels Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -581,7 +581,7 @@ httpRequestFree(void *data) if (entry) mem = entry->mem_obj; if (http->out.size || http->log_type) { - http->al.icp.opcode = 0; + http->al.icp.opcode = ICP_INVALID; http->al.url = http->log_uri; debug(33, 9) ("httpRequestFree: al.url='%s'\n", http->al.url); if (mem) { diff --git a/src/enums.h b/src/enums.h index ee75d11ad8..b034623519 100644 --- a/src/enums.h +++ b/src/enums.h @@ -1,6 +1,6 @@ /* - * $Id: enums.h,v 1.113 1998/07/31 00:15:42 wessels Exp $ + * $Id: enums.h,v 1.114 1998/08/14 19:25:17 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -379,6 +379,7 @@ typedef enum { } protocol_t; typedef enum { + HTTP_STATUS_NONE = 0, HTTP_CONTINUE = 100, HTTP_SWITCHING_PROTOCOLS = 101, HTTP_OK = 200, @@ -419,7 +420,7 @@ typedef enum { HTTP_INVALID_HEADER = 600 /* Squid header parsing error */ } http_status; -enum { +typedef enum { PD_INITED, /* initialized */ PD_USABLE, /* ready to use */ PD_REQUESTED, /* we are in the process of receiving a [fresh] digest */ diff --git a/src/errorpage.cc b/src/errorpage.cc index 818c3002a4..863758694c 100644 --- a/src/errorpage.cc +++ b/src/errorpage.cc @@ -1,6 +1,6 @@ /* - * $Id: errorpage.cc,v 1.140 1998/07/22 20:37:17 wessels Exp $ + * $Id: errorpage.cc,v 1.141 1998/08/14 19:25:18 wessels Exp $ * * DEBUG: section 4 Error Generation * AUTHOR: Duane Wessels @@ -97,11 +97,11 @@ static CWCB errorSendComplete; void errorInitialize(void) { - int i; + err_type i; const char *text; error_page_count = ERR_MAX + ErrorDynamicPages.count; error_text = xcalloc(error_page_count, sizeof(char *)); - for (i = ERR_NONE + 1; i < error_page_count; i++) { + for (i = ERR_NONE, i++; i < error_page_count; i++) { safe_free(error_text[i]); /* hard-coded ? */ if ((text = errorFindHardText(i))) @@ -217,7 +217,7 @@ errorFree(void) * Abstract: This function creates a ErrorState object. */ ErrorState * -errorCon(int type, http_status status) +errorCon(err_type type, http_status status) { ErrorState *err = xcalloc(1, sizeof(ErrorState)); err->page_id = type; /* has to be reset manually if needed */ diff --git a/src/ftp.cc b/src/ftp.cc index 7f24547f9d..0f64c779ce 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -1,6 +1,6 @@ /* - * $Id: ftp.cc,v 1.243 1998/08/14 09:22:35 wessels Exp $ + * $Id: ftp.cc,v 1.244 1998/08/14 19:25:19 wessels Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived @@ -2162,8 +2162,8 @@ ftpSendReply(FtpStateData * ftpState) { ErrorState *err; int code = ftpState->ctrl.replycode; - int http_code; - int err_code = ERR_NONE; + http_status http_code; + err_type err_code = ERR_NONE; debug(9, 5) ("ftpSendReply: %s, code %d\n", storeUrl(ftpState->entry), code); if (cbdataValid(ftpState)) diff --git a/src/http.cc b/src/http.cc index 7554a7fc70..4926fff502 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1,6 +1,6 @@ /* - * $Id: http.cc,v 1.305 1998/08/14 09:22:37 wessels Exp $ + * $Id: http.cc,v 1.306 1998/08/14 19:25:20 wessels Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -236,7 +236,7 @@ httpProcessReplyHeader(HttpStateData * httpState, const char *buf, int size) if (hdr_len > 4 && strncmp(httpState->reply_hdr, "HTTP/", 5)) { debug(11, 3) ("httpProcessReplyHeader: Non-HTTP-compliant header: '%s'\n", httpState->reply_hdr); httpState->reply_hdr_state += 2; - reply->sline.status = 555; + reply->sline.status = HTTP_INVALID_HEADER; return; } t = httpState->reply_hdr + hdr_len; diff --git a/src/icp_v2.cc b/src/icp_v2.cc index f49e55fc70..84fc70e4f7 100644 --- a/src/icp_v2.cc +++ b/src/icp_v2.cc @@ -1,6 +1,6 @@ /* - * $Id: icp_v2.cc,v 1.46 1998/07/22 20:53:57 wessels Exp $ + * $Id: icp_v2.cc,v 1.47 1998/08/14 19:25:21 wessels Exp $ * * DEBUG: section 12 Internet Cache Protocol * AUTHOR: Duane Wessels @@ -227,7 +227,7 @@ icpHandleIcpV2(int fd, struct sockaddr_in from, char *buf, int len) * count this DENIED query in the clientdb, even though * we're not sending an ICP reply... */ - clientdbUpdate(from.sin_addr, LOG_UDP_DENIED, Config.Port.icp, 0); + clientdbUpdate(from.sin_addr, LOG_UDP_DENIED, PROTO_ICP, 0); } else { reply = icpCreateMessage(ICP_DENIED, 0, url, header.reqnum, 0); icpUdpSend(fd, &from, reply, LOG_UDP_DENIED, 0); diff --git a/src/icp_v3.cc b/src/icp_v3.cc index e96a0570d5..c721f330aa 100644 --- a/src/icp_v3.cc +++ b/src/icp_v3.cc @@ -1,6 +1,6 @@ /* - * $Id: icp_v3.cc,v 1.22 1998/07/22 20:53:58 wessels Exp $ + * $Id: icp_v3.cc,v 1.23 1998/08/14 19:25:22 wessels Exp $ * * DEBUG: section 12 Internet Cache Protocol * AUTHOR: Duane Wessels @@ -81,7 +81,7 @@ icpHandleIcpV3(int fd, struct sockaddr_in from, char *buf, int len) * count this DENIED query in the clientdb, even though * we're not sending an ICP reply... */ - clientdbUpdate(from.sin_addr, LOG_UDP_DENIED, Config.Port.icp, 0); + clientdbUpdate(from.sin_addr, LOG_UDP_DENIED, PROTO_ICP, 0); } else { reply = icpCreateMessage(ICP_DENIED, 0, url, header.reqnum, 0); icpUdpSend(fd, &from, reply, LOG_UDP_DENIED, 0); diff --git a/src/mem.cc b/src/mem.cc index 9cb900f150..021381b2c2 100644 --- a/src/mem.cc +++ b/src/mem.cc @@ -1,6 +1,6 @@ /* - * $Id: mem.cc,v 1.30 1998/07/22 20:37:34 wessels Exp $ + * $Id: mem.cc,v 1.31 1998/08/14 19:25:23 wessels Exp $ * * DEBUG: section 13 High Level Memory Pool Management * AUTHOR: Harvest Derived @@ -277,7 +277,7 @@ memInit(void) memDataInit(MEM_WORDLIST, "wordlist", sizeof(wordlist), 0); memDataInit(MEM_CLIENT_INFO, "ClientInfo", sizeof(ClientInfo), 0); /* test that all entries are initialized */ - for (t = MEM_NONE + 1; t < MEM_MAX; t++) { + for (t = MEM_NONE, t++; t < MEM_MAX; t++) { if (MEM_DONTFREE == t) continue; /* diff --git a/src/mime.cc b/src/mime.cc index adf32f62a1..c80805119e 100644 --- a/src/mime.cc +++ b/src/mime.cc @@ -1,6 +1,6 @@ /* - * $Id: mime.cc,v 1.73 1998/07/22 20:37:35 wessels Exp $ + * $Id: mime.cc,v 1.74 1998/08/14 19:25:24 wessels Exp $ * * DEBUG: section 25 MIME Parsing * AUTHOR: Harvest Derived @@ -441,7 +441,7 @@ mimeLoadIconFile(const char *icon) assert(e != NULL); e->mem_obj->request = requestLink(urlParse(METHOD_GET, url)); httpReplyReset(e->mem_obj->reply); - httpReplySetHeaders(e->mem_obj->reply, 1.0, 200, NULL, + httpReplySetHeaders(e->mem_obj->reply, 1.0, HTTP_OK, NULL, type, (int) sb.st_size, sb.st_mtime, squid_curtime + 86400); httpReplySwapOut(e->mem_obj->reply, e); /* read the file into the buffer and append it to store */