* Fixup a few more compiler warnings from icc
authorMichael Hampton <io_error@uncensored.citadel.org>
Wed, 6 Oct 2004 21:23:22 +0000 (21:23 +0000)
committerMichael Hampton <io_error@uncensored.citadel.org>
Wed, 6 Oct 2004 21:23:22 +0000 (21:23 +0000)
citadel/ChangeLog
citadel/citadel_ipc.c
citadel/citadel_ipc.h
citadel/citserver.c

index 9318267c2eef02287951c25e653efa689ab8c175..a2371253a86b79ee5622e4213888dc2d07b6fcbc 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 626.8  2004/10/06 21:23:21  error
+ * Fixup a few more compiler warnings from icc
+
  Revision 626.7  2004/10/05 01:44:20  ajc
  * Changed a bunch of localtime() calls to localtime_r(), for great justice.
 
@@ -6144,3 +6147,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
+
index ce5729cb21ae75992982d71baf0ad7186d21c041..cc79106dac326dcede156234783ee8b1fc1acb7f 100644 (file)
@@ -2128,7 +2128,6 @@ size_t CtdlIPCPartialRead(CtdlIPC *ipc, void **buf, size_t offset, size_t bytes,
        if (!buf) return 0;
        if (!cret) return 0;
        if (bytes < 1) return 0;
-       if (offset < 0) return 0;
 
        CtdlIPC_lock(ipc);
        sprintf(aaa, "READ %d|%d", (int)offset, (int)bytes);
@@ -2141,7 +2140,7 @@ size_t CtdlIPCPartialRead(CtdlIPC *ipc, void **buf, size_t offset, size_t bytes,
                *buf = (void *)realloc(*buf, (size_t)(offset + len));
                if (*buf) {
                        /* I know what I'm doing */
-                       serv_read(ipc, (*buf + offset), len);
+                       serv_read(ipc, ((char *)(*buf) + offset), len);
                } else {
                        /* We have to read regardless */
                        serv_read(ipc, aaa, len);
@@ -2254,7 +2253,7 @@ int CtdlIPCHighSpeedReadDownload(CtdlIPC *ipc, void **buf, size_t bytes,
                else {
                        len = extract_long(&aaa[4], 0);
                        /* I know what I'm doing */
-                       serv_read(ipc, ((*buf) + (i * 4096)), len);
+                       serv_read(ipc, ((char *)(*buf) + (i * 4096)), len);
                }
                if (progress_gauge_callback)
                        progress_gauge_callback(ipc, i * 4096 + len, bytes);
index 2ebea61e5fee65a9eb40181aabd44744fc1f1836..e077ea0528904266467c44ca31412bbc6e6b1330 100644 (file)
@@ -140,8 +140,8 @@ struct ctdlipcfile {
        char description[80];           /* Description on server */
        FILE *local_fd;                 /* Open file on client */
        size_t size;                    /* Size of file in octets */
-       int upload:1;                   /* uploading? 0 if downloading */
-       int complete:1;                 /* Transfer has finished? */
+       unsigned int upload:1;          /* uploading? 0 if downloading */
+       unsigned int complete:1;        /* Transfer has finished? */
 };
 
 
index dcd1045d45cf537bed5fe7226e5299f340501590..f3a9ce04808513c59258696b1537217bb5798bbc 100644 (file)
@@ -866,7 +866,7 @@ void generate_nonce(struct CitContext *con) {
  */
 void begin_session(struct CitContext *con)
 {
-       int len;        /* should be socklen_t but doesn't work on Macintosh */
+       int len;
        struct sockaddr_in sin;
 
        /* 
@@ -895,7 +895,7 @@ void begin_session(struct CitContext *con)
        len = sizeof sin;
        if (!CC->is_local_socket) {
                if (!getpeername(con->client_socket,
-                  (struct sockaddr *) &sin, &len))
+                  (struct sockaddr *) &sin, &len))     /* should be socklen_t but doesn't work on Macintosh */
                        locate_host(con->cs_host, sizeof con->cs_host,
                                con->cs_addr, sizeof con->cs_addr,
                                &sin.sin_addr);