]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
IRIX compiler warnings
authorwessels <>
Sat, 15 Aug 1998 01:25:11 +0000 (01:25 +0000)
committerwessels <>
Sat, 15 Aug 1998 01:25:11 +0000 (01:25 +0000)
13 files changed:
src/HttpReply.cc
src/HttpStatusLine.cc
src/acl.cc
src/cachemgr.cc
src/client_side.cc
src/enums.h
src/errorpage.cc
src/ftp.cc
src/http.cc
src/icp_v2.cc
src/icp_v3.cc
src/mem.cc
src/mime.cc

index ec54059c25a48cc5031e6be9cc1b16ce05100963..8f0660a7892e2a6b3ce12e4af3a1905ee2bb2d3a 100644 (file)
@@ -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;
index 6cd04b0fd5fe020ffc133ecc52341f18cf31e892..f5d08fbe788b5f8f624a4bdafa195ad0007f57b1 100644 (file)
@@ -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 */
index 99100c545a3d433fc7ec5243e442b0c847e80ce9..5d3b7d12f96dc72f48e65e44d74da4500dcf4870 100644 (file)
@@ -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 */
index f474791e5dc4b5aed1a65e0685e6321f14f7a7ec..8ad63b3253a81c1196b6bd09bade4c3aac6a92ce 100644 (file)
@@ -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;
index 9cf4a436f94a35e8dbd9094a840d2e0540e5f6e5..0fab6a9697c95c88bc51fc1570862d76a9f6262f 100644 (file)
@@ -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) {
index ee75d11ad8d53c54488d3c19771cd36fabe6f0ac..b034623519821ff7303e64d1bf2e346456e8c4e3 100644 (file)
@@ -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 */
index 818c3002a4df85125ecb732c101d7658f700cef3..863758694ca0ca054d124bfc3237a75e8c4b06f0 100644 (file)
@@ -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 */
index 7f24547f9de04d64a8daeb37eb4e278805a5d243..0f64c779ce18757ef5ea674d8875143d28371f04 100644 (file)
@@ -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))
index 7554a7fc7062c6288803eac9ba0169bc69c7b2ef..4926fff50258a709499478bb9b93f4c897b6e36f 100644 (file)
@@ -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;
index f49e55fc7018cf737cc8db613cb4c0bb17772b07..84fc70e4f71c0b3e7cb029d297cf3932f549774b 100644 (file)
@@ -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);
index e96a0570d5846e3776bbf3b262b43966a9938ff1..c721f330aad26b78b8d1620679637492809336a3 100644 (file)
@@ -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);
index 9cb900f150d83eae2fbac1117976a0d28545ab42..021381b2c2693a0910f6bdba6da3a694c0fbef22 100644 (file)
@@ -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;
        /*
index adf32f62a1140e57943d4d0f687d9b4f6cbfc84d..c80805119ec1178e82d462d8e8d652d0318cde4c 100644 (file)
@@ -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 */