From: Ezra Peisach Date: Fri, 6 Feb 2009 02:45:21 +0000 (+0000) Subject: Cleanup some warnings due to getsockname's third argument is sometimes X-Git-Tag: krb5-1.8-alpha1~700 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2538562271915fb954e8242a32443fc673ca13f4;p=krb5.git Cleanup some warnings due to getsockname's third argument is sometimes unsigned. Use GETSOCKNAME_ARG3_TYPE and fallback to int if not defined. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21904 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/rpc/clnt_tcp.c b/src/lib/rpc/clnt_tcp.c index dc7e2ff50..716849336 100644 --- a/src/lib/rpc/clnt_tcp.c +++ b/src/lib/rpc/clnt_tcp.c @@ -64,6 +64,10 @@ static char sccsid[] = "@(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro"; #define MCALL_MSG_SIZE 24 +#ifndef GETSOCKNAME_ARG3_TYPE +#define GETSOCKNAME_ARG3_TYPE int +#endif + static enum clnt_stat clnttcp_call(CLIENT *, rpcproc_t, xdrproc_t, void *, xdrproc_t, void *, struct timeval); static void clnttcp_abort(CLIENT *); @@ -372,7 +376,7 @@ clnttcp_control( void *info) { register struct ct_data *ct = (struct ct_data *)cl->cl_private; - int len; + GETSOCKNAME_ARG3_TYPE len; switch (request) { case CLSET_TIMEOUT: diff --git a/src/lib/rpc/clnt_udp.c b/src/lib/rpc/clnt_udp.c index 8722e755a..25474b9e9 100644 --- a/src/lib/rpc/clnt_udp.c +++ b/src/lib/rpc/clnt_udp.c @@ -52,6 +52,9 @@ static char sccsid[] = "@(#)clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro"; #include #include +#ifndef GETSOCKNAME_ARG3_TYPE +#define GETSOCKNAME_ARG3_TYPE int +#endif /* * UDP bases client side rpc operations @@ -82,7 +85,7 @@ struct cu_data { struct sockaddr_in cu_raddr; int cu_rlen; struct sockaddr_in cu_laddr; - int cu_llen; + GETSOCKNAME_ARG3_TYPE cu_llen; struct timeval cu_wait; struct timeval cu_total; struct rpc_err cu_error; @@ -235,7 +238,7 @@ clntudp_call( register XDR *xdrs; register int outlen; register int inlen; - int fromlen; + GETSOCKNAME_ARG3_TYPE fromlen; /* Assumes recvfrom uses same type */ #ifdef FD_SETSIZE fd_set readfds; fd_set mask; diff --git a/src/lib/rpc/pmap_rmt.c b/src/lib/rpc/pmap_rmt.c index d2e2ccdbc..dbe597da3 100644 --- a/src/lib/rpc/pmap_rmt.c +++ b/src/lib/rpc/pmap_rmt.c @@ -64,6 +64,9 @@ static char sccsid[] = "@(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro"; static struct timeval timeout = { 3, 0 }; +#ifndef GETSOCKNAME_ARG3_TYPE +#define GETSOCKNAME_ARG3_TYPE int +#endif /* * pmapper remote-call-service interface. @@ -245,7 +248,8 @@ clnt_broadcast( AUTH *unix_auth = authunix_create_default(); XDR xdr_stream; register XDR *xdrs = &xdr_stream; - int outlen, inlen, fromlen, nets; + int outlen, inlen, nets; + GETSOCKNAME_ARG3_TYPE fromlen; SOCKET sock; int on = 1; #ifdef FD_SETSIZE