diff options
author | alfred <alfred@FreeBSD.org> | 2002-10-07 02:56:59 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2002-10-07 02:56:59 +0000 |
commit | dccd7d6c72bdb1f5cb62f2b4626c902d14e5a0f4 (patch) | |
tree | a88dc934c05e89a4a453c612cac5eef1c623657a | |
parent | c199cbd7cfbb378004d244f95641daeb8e0775cb (diff) | |
download | FreeBSD-src-dccd7d6c72bdb1f5cb62f2b4626c902d14e5a0f4.zip FreeBSD-src-dccd7d6c72bdb1f5cb62f2b4626c902d14e5a0f4.tar.gz |
WARNS=3 safety (mostly), use __unused for unused params and unsigned where
needed to avoid warnings about comparing signed and unsigned values.
-rw-r--r-- | usr.sbin/rpcbind/check_bound.c | 2 | ||||
-rw-r--r-- | usr.sbin/rpcbind/pmap_svc.c | 6 | ||||
-rw-r--r-- | usr.sbin/rpcbind/rpcb_stat.c | 6 | ||||
-rw-r--r-- | usr.sbin/rpcbind/rpcb_svc.c | 8 | ||||
-rw-r--r-- | usr.sbin/rpcbind/rpcb_svc_4.c | 12 | ||||
-rw-r--r-- | usr.sbin/rpcbind/rpcb_svc_com.c | 28 | ||||
-rw-r--r-- | usr.sbin/rpcbind/rpcbind.c | 7 | ||||
-rw-r--r-- | usr.sbin/rpcbind/rpcbind.h | 4 | ||||
-rw-r--r-- | usr.sbin/rpcbind/security.c | 4 | ||||
-rw-r--r-- | usr.sbin/rpcbind/util.c | 3 |
10 files changed, 40 insertions, 40 deletions
diff --git a/usr.sbin/rpcbind/check_bound.c b/usr.sbin/rpcbind/check_bound.c index c955506..192c9ca 100644 --- a/usr.sbin/rpcbind/check_bound.c +++ b/usr.sbin/rpcbind/check_bound.c @@ -109,7 +109,7 @@ check_bound(struct fdlist *fdl, char *uaddr) } int -add_bndlist(struct netconfig *nconf, struct netbuf *baddr) +add_bndlist(struct netconfig *nconf, struct netbuf *baddr __unused) { struct fdlist *fdl; struct netconfig *newnconf; diff --git a/usr.sbin/rpcbind/pmap_svc.c b/usr.sbin/rpcbind/pmap_svc.c index 9adb558..d74b369 100644 --- a/usr.sbin/rpcbind/pmap_svc.c +++ b/usr.sbin/rpcbind/pmap_svc.c @@ -167,7 +167,7 @@ find_service_pmap(rpcprog_t prog, rpcvers_t vers, rpcprot_t prot) } static bool_t -pmapproc_change(struct svc_req *rqstp, SVCXPRT *xprt, unsigned long op) +pmapproc_change(struct svc_req *rqstp __unused, SVCXPRT *xprt, unsigned long op) { struct pmap reg; RPCB rpcbreg; @@ -261,7 +261,7 @@ done_change: /* ARGSUSED */ static bool_t -pmapproc_getport(struct svc_req *rqstp, SVCXPRT *xprt) +pmapproc_getport(struct svc_req *rqstp __unused, SVCXPRT *xprt) { struct pmap reg; long lport; @@ -342,7 +342,7 @@ sendreply: /* ARGSUSED */ static bool_t -pmapproc_dump(struct svc_req *rqstp, SVCXPRT *xprt) +pmapproc_dump(struct svc_req *rqstp __unused, SVCXPRT *xprt) { if (!svc_getargs(xprt, (xdrproc_t)xdr_void, NULL)) { svcerr_decode(xprt); diff --git a/usr.sbin/rpcbind/rpcb_stat.c b/usr.sbin/rpcbind/rpcb_stat.c index 0cf219e..e2cf89e 100644 --- a/usr.sbin/rpcbind/rpcb_stat.c +++ b/usr.sbin/rpcbind/rpcb_stat.c @@ -198,11 +198,9 @@ rpcbs_rmtcall(rpcvers_t rtype, rpcproc_t rpcbproc, rpcprog_t prog, return; } -/* - */ void * -rpcbproc_getstat(void *arg, struct svc_req *req, SVCXPRT *xprt, - rpcvers_t versnum) +rpcbproc_getstat(void *arg __unused, struct svc_req *req __unused, + SVCXPRT *xprt __unused, rpcvers_t versnum __unused) { return (void *)&inf; } diff --git a/usr.sbin/rpcbind/rpcb_svc.c b/usr.sbin/rpcbind/rpcb_svc.c index b01e9ac..dc3cf05 100644 --- a/usr.sbin/rpcbind/rpcb_svc.c +++ b/usr.sbin/rpcbind/rpcb_svc.c @@ -204,8 +204,8 @@ done: */ /* ARGSUSED */ static void * -rpcbproc_getaddr_3_local(void *arg, struct svc_req *rqstp, SVCXPRT *transp, - rpcvers_t versnum) +rpcbproc_getaddr_3_local(void *arg, struct svc_req *rqstp __unused, + SVCXPRT *transp __unused, rpcvers_t versnum __unused) { RPCB *regp = (RPCB *)arg; #ifdef RPCBIND_DEBUG @@ -226,8 +226,8 @@ rpcbproc_getaddr_3_local(void *arg, struct svc_req *rqstp, SVCXPRT *transp, /* ARGSUSED */ static void * -rpcbproc_dump_3_local(void *arg, struct svc_req *rqstp, SVCXPRT *transp, - rpcvers_t versnum) +rpcbproc_dump_3_local(void *arg __unused, struct svc_req *rqstp __unused, + SVCXPRT *transp __unused, rpcvers_t versnum __unused) { return ((void *)&list_rbl); } diff --git a/usr.sbin/rpcbind/rpcb_svc_4.c b/usr.sbin/rpcbind/rpcb_svc_4.c index 0b2d4a8..8e2ed10 100644 --- a/usr.sbin/rpcbind/rpcb_svc_4.c +++ b/usr.sbin/rpcbind/rpcb_svc_4.c @@ -262,7 +262,7 @@ done: /* ARGSUSED */ static void * rpcbproc_getaddr_4_local(void *arg, struct svc_req *rqstp, SVCXPRT *transp, - rpcvers_t rpcbversnum) + rpcvers_t rpcbversnum __unused) { RPCB *regp = (RPCB *)arg; #ifdef RPCBIND_DEBUG @@ -292,7 +292,7 @@ rpcbproc_getaddr_4_local(void *arg, struct svc_req *rqstp, SVCXPRT *transp, /* ARGSUSED */ static void * rpcbproc_getversaddr_4_local(void *arg, struct svc_req *rqstp, SVCXPRT *transp, - rpcvers_t versnum) + rpcvers_t versnum __unused) { RPCB *regp = (RPCB *)arg; #ifdef RPCBIND_DEBUG @@ -319,8 +319,8 @@ rpcbproc_getversaddr_4_local(void *arg, struct svc_req *rqstp, SVCXPRT *transp, */ /* ARGSUSED */ static void * -rpcbproc_getaddrlist_4_local(void *arg, struct svc_req *rqstp, SVCXPRT *transp, - rpcvers_t versnum) +rpcbproc_getaddrlist_4_local(void *arg, struct svc_req *rqstp __unused, + SVCXPRT *transp, rpcvers_t versnum __unused) { RPCB *regp = (RPCB *)arg; static rpcb_entry_list_ptr rlist; @@ -448,8 +448,8 @@ free_rpcb_entry_list(rpcb_entry_list_ptr *rlistp) /* ARGSUSED */ static void * -rpcbproc_dump_4_local(void *arg, struct svc_req *req, SVCXPRT *xprt, - rpcvers_t versnum) +rpcbproc_dump_4_local(void *arg __unused, struct svc_req *req __unused, + SVCXPRT *xprt __unused, rpcvers_t versnum __unused) { return ((void *)&list_rbl); } diff --git a/usr.sbin/rpcbind/rpcb_svc_com.c b/usr.sbin/rpcbind/rpcb_svc_com.c index ad9275e..83b7e44 100644 --- a/usr.sbin/rpcbind/rpcb_svc_com.c +++ b/usr.sbin/rpcbind/rpcb_svc_com.c @@ -121,7 +121,7 @@ static int del_pmaplist __P((RPCB *)); */ /* ARGSUSED */ void * -rpcbproc_set_com(void *arg, struct svc_req *rqstp, SVCXPRT *transp, +rpcbproc_set_com(void *arg, struct svc_req *rqstp __unused, SVCXPRT *transp, rpcvers_t rpcbversnum) { RPCB *regp = (RPCB *)arg; @@ -209,7 +209,7 @@ map_set(RPCB *regp, char *owner) */ /* ARGSUSED */ void * -rpcbproc_unset_com(void *arg, struct svc_req *rqstp, SVCXPRT *transp, +rpcbproc_unset_com(void *arg, struct svc_req *rqstp __unused, SVCXPRT *transp, rpcvers_t rpcbversnum) { RPCB *regp = (RPCB *)arg; @@ -284,7 +284,7 @@ map_unset(RPCB *regp, char *owner) } void -delete_prog(int prog) +delete_prog(unsigned int prog) { RPCB reg; register rpcblist_ptr rbl; @@ -303,8 +303,8 @@ delete_prog(int prog) } void * -rpcbproc_getaddr_com(RPCB *regp, struct svc_req *rqstp, SVCXPRT *transp, - rpcvers_t rpcbversnum, rpcvers_t verstype) +rpcbproc_getaddr_com(RPCB *regp, struct svc_req *rqstp __unused, + SVCXPRT *transp, rpcvers_t rpcbversnum, rpcvers_t verstype) { static char *uaddr; char *saddr = NULL; @@ -346,8 +346,8 @@ rpcbproc_getaddr_com(RPCB *regp, struct svc_req *rqstp, SVCXPRT *transp, /* ARGSUSED */ void * -rpcbproc_gettime_com(void *arg, struct svc_req *rqstp, SVCXPRT *transp, - rpcvers_t rpcbversnum) +rpcbproc_gettime_com(void *arg __unused, struct svc_req *rqstp __unused, + SVCXPRT *transp __unused, rpcvers_t rpcbversnum __unused) { static time_t curtime; @@ -361,8 +361,8 @@ rpcbproc_gettime_com(void *arg, struct svc_req *rqstp, SVCXPRT *transp, */ /* ARGSUSED */ void * -rpcbproc_uaddr2taddr_com(void *arg, struct svc_req *rqstp, SVCXPRT *transp, - rpcvers_t rpcbversnum) +rpcbproc_uaddr2taddr_com(void *arg, struct svc_req *rqstp __unused, + SVCXPRT *transp, rpcvers_t rpcbversnum __unused) { char **uaddrp = (char **)arg; struct netconfig *nconf; @@ -388,8 +388,8 @@ rpcbproc_uaddr2taddr_com(void *arg, struct svc_req *rqstp, SVCXPRT *transp, */ /* ARGSUSED */ void * -rpcbproc_taddr2uaddr_com(void *arg, struct svc_req *rqstp, SVCXPRT *transp, - rpcvers_t rpcbversnum) +rpcbproc_taddr2uaddr_com(void *arg, struct svc_req *rqstp __unused, + SVCXPRT *transp, rpcvers_t rpcbversnum __unused) { struct netbuf *taddr = (struct netbuf *)arg; static char *uaddr; @@ -1297,8 +1297,8 @@ static void find_versions(rpcprog_t prog, char *netid, rpcvers_t *lowvp, rpcvers_t *highvp) { register rpcblist_ptr rbl; - int lowv = 0; - int highv = 0; + unsigned int lowv = 0; + unsigned int highv = 0; for (rbl = list_rbl; rbl != NULL; rbl = rbl->rpcb_next) { if ((rbl->rpcb_map.r_prog != prog) || @@ -1426,7 +1426,7 @@ del_pmaplist(RPCB *arg) { struct pmaplist *pml; struct pmaplist *prevpml, *fnd; - long prot; + unsigned long prot; if (strcmp(arg->r_netid, udptrans) == 0) { /* It is UDP! */ diff --git a/usr.sbin/rpcbind/rpcbind.c b/usr.sbin/rpcbind/rpcbind.c index 924a087e..af6bc07 100644 --- a/usr.sbin/rpcbind/rpcbind.c +++ b/usr.sbin/rpcbind/rpcbind.c @@ -60,6 +60,7 @@ static char sccsid[] = "@(#)rpcbind.c 1.35 89/04/21 Copyr 1984 Sun Micro"; #ifdef PORTMAP #include <netinet/in.h> #endif +#include <arpa/inet.h> #include <netdb.h> #include <stdio.h> #include <netconfig.h> @@ -644,7 +645,7 @@ rbllist_add(rpcprog_t prog, rpcvers_t vers, struct netconfig *nconf, * Catch the signal and die */ static void -terminate(int dummy) +terminate(int dummy __unused) { #ifdef WARMSTART syslog(LOG_ERR, @@ -717,7 +718,7 @@ parseargs(int argc, char *argv[]) } void -reap(int dummy) +reap(int dummy __unused) { int save_errno = errno; @@ -727,7 +728,7 @@ reap(int dummy) } void -toggle_verboselog(int dummy) +toggle_verboselog(int dummy __unused) { verboselog = !verboselog; } diff --git a/usr.sbin/rpcbind/rpcbind.h b/usr.sbin/rpcbind/rpcbind.h index 63cf2d4..2d52be3 100644 --- a/usr.sbin/rpcbind/rpcbind.h +++ b/usr.sbin/rpcbind/rpcbind.h @@ -102,7 +102,7 @@ void *rpcbproc_set_com __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t)); void *rpcbproc_unset_com __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t)); bool_t map_set __P((RPCB *, char *)); bool_t map_unset __P((RPCB *, char *)); -void delete_prog __P((int)); +void delete_prog __P((unsigned int)); void *rpcbproc_getaddr_com __P((RPCB *, struct svc_req *, SVCXPRT *, rpcvers_t, rpcvers_t)); void *rpcbproc_gettime_com __P((void *, struct svc_req *, SVCXPRT *, @@ -120,7 +120,7 @@ void rpcbind_abort __P((void)); void reap __P((int)); void toggle_verboselog __P((int)); -int check_access __P((SVCXPRT *, rpcproc_t, void *, int)); +int check_access __P((SVCXPRT *, rpcproc_t, void *, unsigned int)); int check_callit __P((SVCXPRT *, struct r_rmtcall_args *, int)); void logit __P((int, struct sockaddr *, rpcproc_t, rpcprog_t, const char *)); int is_loopback __P((struct netbuf *)); diff --git a/usr.sbin/rpcbind/security.c b/usr.sbin/rpcbind/security.c index 0311f58..7b52241 100644 --- a/usr.sbin/rpcbind/security.c +++ b/usr.sbin/rpcbind/security.c @@ -59,7 +59,7 @@ int log_severity = PORTMAP_LOG_FACILITY|PORTMAP_LOG_SEVERITY; extern int verboselog; int -check_access(SVCXPRT *xprt, rpcproc_t proc, void *args, int rpcbvers) +check_access(SVCXPRT *xprt, rpcproc_t proc, void *args, unsigned int rpcbvers) { struct netbuf *caller = svc_getrpccaller(xprt); struct sockaddr *addr = (struct sockaddr *)caller->buf; @@ -226,7 +226,7 @@ logit(int severity, struct sockaddr *addr, rpcproc_t procnum, rpcprog_t prognum, } int -check_callit(SVCXPRT *xprt, struct r_rmtcall_args *args, int versnum) +check_callit(SVCXPRT *xprt, struct r_rmtcall_args *args, int versnum __unused) { struct sockaddr *sa = (struct sockaddr *)svc_getrpccaller(xprt)->buf; diff --git a/usr.sbin/rpcbind/util.c b/usr.sbin/rpcbind/util.c index f62c828..4137ce2 100644 --- a/usr.sbin/rpcbind/util.c +++ b/usr.sbin/rpcbind/util.c @@ -295,7 +295,8 @@ network_init() #ifdef INET6 struct ifaddrs *ifap, *ifp; struct ipv6_mreq mreq6; - int ifindex, s; + unsigned int ifindex; + int s; #endif int ecode; struct addrinfo hints, *res; |