Removed more warnings. In particular added ifdef's on IPV6 for

variables only used in IPV6.
This commit is contained in:
Joel Sherrill
2000-05-28 17:47:39 +00:00
parent f8d3664510
commit 1d89b75c96
8 changed files with 18 additions and 1 deletions

View File

@@ -58,7 +58,9 @@ bindresvport_sa(sd, sa)
int old, error, af;
struct sockaddr myaddr;
struct sockaddr_in *sin;
#if (defined(AF_INET6) && defined(IPPROTO_IPV6))
struct sockaddr_in6 *sin6;
#endif
int proto, portrange, portlow;
u_int16_t port;
int salen;

View File

@@ -57,7 +57,9 @@ clnt_create(hostname, prog, vers, proto)
struct hostent *h;
struct protoent *p;
struct sockaddr_in sin;
#ifndef __rtems__
struct sockaddr_un sun;
#endif
int sock;
struct timeval tv;
CLIENT *client;

View File

@@ -52,7 +52,9 @@ static char sccsid[] = "@(#)netnamer.c 1.13 91/03/11 Copyr 1986 Sun Micro";
#include <unistd.h>
static char *OPSYS = "unix";
#ifdef YP
static char *NETID = "netid.byname";
#endif
static char *NETIDFILE = "/etc/netid";
static int getnetid __P(( char *, char * ));

View File

@@ -242,7 +242,7 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
int outlen, inlen, fromlen, nets;
register int sock;
int on = 1;
fd_set *fds, readfds;
fd_set *fds = 0, readfds; /* initialized to avoid warning */
register int i;
bool_t done = FALSE;
register u_long xid;

View File

@@ -724,6 +724,8 @@ xdr_string(xdrs, cpp, maxsize)
case XDR_ENCODE:
size = strlen(sp);
break;
case XDR_DECODE: /* to avoid warning */
break;
}
if (! xdr_u_int(xdrs, &size)) {
return (FALSE);

View File

@@ -102,6 +102,8 @@ xdr_array(xdrs, addrp, sizep, maxsize, elsize, elproc)
case XDR_FREE:
return (TRUE);
case XDR_ENCODE: /* to avoid warning */
break;
}
/*

View File

@@ -55,6 +55,7 @@ static char *rcsid = "$FreeBSD: src/lib/libc/xdr/xdr_rec.c,v 1.12 2000/01/19 06:
#include <rpc/types.h>
#include <rpc/xdr.h>
#include <netinet/in.h>
#include <unistd.h> /* for lseek() */
static u_int fix_buf_size();
static bool_t flush_out();
@@ -352,6 +353,8 @@ xdrrec_setpos(xdrs, pos)
return (TRUE);
}
break;
case XDR_FREE: /* to avoid warning */
break;
}
return (FALSE);
}
@@ -381,6 +384,8 @@ xdrrec_inline(xdrs, len)
rstrm->in_finger += len;
}
break;
case XDR_FREE: /* to avoid warning */
break;
}
return (buf);
}

View File

@@ -83,6 +83,8 @@ xdr_reference(xdrs, pp, size, proc)
}
memset(loc, 0, (int)size);
break;
case XDR_ENCODE: /* to avoid warning */
break;
}
stat = (*proc)(xdrs, loc, LASTUNSIGNED);