From b7df13b4fe01efcb68d36068ab23a9c2d01051ee Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Wed, 4 Sep 1996 20:02:32 +0000 Subject: [PATCH] fixed gcc warning --- src/ca/if_depen.c | 2 +- src/ca/repeater.c | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/ca/if_depen.c b/src/ca/if_depen.c index 1c1dc2424..59346ce19 100644 --- a/src/ca/if_depen.c +++ b/src/ca/if_depen.c @@ -88,7 +88,7 @@ int local_addr(int s, struct sockaddr_in *plcladdr) #endif for ( pifreq = ifconf.ifc_req; - ifconf.ifc_len >= sizeof(*pifreq); + ((size_t)ifconf.ifc_len) >= sizeof(*pifreq); pifreq++, ifconf.ifc_len -= sizeof(*pifreq)) { status = socket_ioctl(s, SIOCGIFFLAGS, pifreq); diff --git a/src/ca/repeater.c b/src/ca/repeater.c index c9e09f588..b4f696c33 100644 --- a/src/ca/repeater.c +++ b/src/ca/repeater.c @@ -63,6 +63,9 @@ * datagram socket (and watching for ECONNREFUSED) * * $Log$ + * Revision 1.36 1996/07/12 00:40:48 jhill + * fixed client disconnect problem under solaris + * * Revision 1.32.6.1 1996/07/12 00:39:59 jhill * fixed client disconnect problem under solaris * @@ -115,13 +118,13 @@ LOCAL void fanOut(struct sockaddr_in *pFrom, const char *pMsg, unsigned msgSize) */ void ca_repeater() { - int status; - int size; - SOCKET sock; - struct sockaddr_in from; - struct sockaddr_in local; - int from_size = sizeof from; - unsigned short port; + int status; + int size; + SOCKET sock; + struct sockaddr_in from; + struct sockaddr_in local; + int from_size = sizeof from; + unsigned short port; port = caFetchPortConfig( &EPICS_CA_REPEATER_PORT, @@ -186,7 +189,7 @@ void ca_repeater() * both zero length message and a registration message * will register a new client */ - if(size >= sizeof(*pMsg)){ + if( ((size_t)size) >= sizeof(*pMsg)){ if(ntohs(pMsg->m_cmmd) == REPEATER_REGISTER){ register_new_client(&local, &from);