From 11cc01d0e306826ff3cceacd569ac30b4f2feeba Mon Sep 17 00:00:00 2001 From: Michael Hampton Date: Wed, 6 Oct 2004 21:23:22 +0000 Subject: [PATCH] * Fixup a few more compiler warnings from icc --- citadel/ChangeLog | 4 ++++ citadel/citadel_ipc.c | 5 ++--- citadel/citadel_ipc.h | 4 ++-- citadel/citserver.c | 4 ++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 9318267c2..a2371253a 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -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 Fri Jul 10 1998 Art Cancro * Initial CVS import + diff --git a/citadel/citadel_ipc.c b/citadel/citadel_ipc.c index ce5729cb2..cc79106da 100644 --- a/citadel/citadel_ipc.c +++ b/citadel/citadel_ipc.c @@ -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); diff --git a/citadel/citadel_ipc.h b/citadel/citadel_ipc.h index 2ebea61e5..e077ea052 100644 --- a/citadel/citadel_ipc.h +++ b/citadel/citadel_ipc.h @@ -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? */ }; diff --git a/citadel/citserver.c b/citadel/citserver.c index dcd1045d4..f3a9ce048 100644 --- a/citadel/citserver.c +++ b/citadel/citserver.c @@ -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); -- 2.39.2