diff options
author | alfred <alfred@FreeBSD.org> | 2002-03-21 23:05:13 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2002-03-21 23:05:13 +0000 |
commit | 454845084c112df969ca14adced4fd6c1d7305b6 (patch) | |
tree | 3803bbc9aa92aa787705912debcb53a710b7472a /usr.sbin | |
parent | 1ee4de1e6508c8ff2104db4ef76298600f39f2a9 (diff) | |
download | FreeBSD-src-454845084c112df969ca14adced4fd6c1d7305b6.zip FreeBSD-src-454845084c112df969ca14adced4fd6c1d7305b6.tar.gz |
Bring code to WARNS=3 level. Mostly fix unused variables.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/rpc.lockd/Makefile | 2 | ||||
-rw-r--r-- | usr.sbin/rpc.lockd/lock_proc.c | 16 | ||||
-rw-r--r-- | usr.sbin/rpc.lockd/lockd_lock.c | 21 |
3 files changed, 22 insertions, 17 deletions
diff --git a/usr.sbin/rpc.lockd/Makefile b/usr.sbin/rpc.lockd/Makefile index de786a1..fd625f4 100644 --- a/usr.sbin/rpc.lockd/Makefile +++ b/usr.sbin/rpc.lockd/Makefile @@ -6,7 +6,7 @@ MAN= rpc.lockd.8 MLINKS= rpc.lockd.8 lockd.8 SRCS= kern.c nlm_prot_svc.c lockd.c lock_proc.c lockd_lock.c NO_WERROR= YES -WARNS?= 1 +WARNS?= 3 CFLAGS+= -I. -I${DESTDIR}/usr/include/rpcsvc diff --git a/usr.sbin/rpc.lockd/lock_proc.c b/usr.sbin/rpc.lockd/lock_proc.c index c322f61..437f5a0 100644 --- a/usr.sbin/rpc.lockd/lock_proc.c +++ b/usr.sbin/rpc.lockd/lock_proc.c @@ -743,7 +743,7 @@ nlm_lock_res_1_svc(arg, rqstp) */ void * nlm_cancel_res_1_svc(arg, rqstp) - nlm_res *arg; + nlm_res *arg __unused; struct svc_req *rqstp; { if (debug_level) @@ -776,7 +776,7 @@ nlm_unlock_res_1_svc(arg, rqstp) */ void * nlm_granted_res_1_svc(arg, rqstp) - nlm_res *arg; + nlm_res *arg __unused; struct svc_req *rqstp; { if (debug_level) @@ -875,7 +875,7 @@ nlm_nm_lock_3_svc(arg, rqstp) */ void * nlm_free_all_3_svc(arg, rqstp) - nlm_notify *arg; + nlm_notify *arg __unused; struct svc_req *rqstp; { static char dummy; @@ -1234,7 +1234,7 @@ nlm4_lock_res_4_svc(arg, rqstp) */ void * nlm4_cancel_res_4_svc(arg, rqstp) - nlm4_res *arg; + nlm4_res *arg __unused; struct svc_req *rqstp; { if (debug_level) @@ -1249,7 +1249,7 @@ nlm4_cancel_res_4_svc(arg, rqstp) */ void * nlm4_unlock_res_4_svc(arg, rqstp) - nlm4_res *arg; + nlm4_res *arg __unused; struct svc_req *rqstp; { if (debug_level) @@ -1264,7 +1264,7 @@ nlm4_unlock_res_4_svc(arg, rqstp) */ void * nlm4_granted_res_4_svc(arg, rqstp) - nlm4_res *arg; + nlm4_res *arg __unused; struct svc_req *rqstp; { if (debug_level) @@ -1363,7 +1363,7 @@ nlm4_nm_lock_4_svc(arg, rqstp) */ void * nlm4_free_all_4_svc(arg, rqstp) - struct nlm4_notify *arg; + struct nlm4_notify *arg __unused; struct svc_req *rqstp; { static char dummy; @@ -1381,7 +1381,7 @@ nlm4_free_all_4_svc(arg, rqstp) void * nlm_sm_notify_0_svc(arg, rqstp) struct nlm_sm_status *arg; - struct svc_req *rqstp; + struct svc_req *rqstp __unused; { static char dummy; notify(arg->mon_name, arg->state); diff --git a/usr.sbin/rpc.lockd/lockd_lock.c b/usr.sbin/rpc.lockd/lockd_lock.c index b80c243..8ffe89f 100644 --- a/usr.sbin/rpc.lockd/lockd_lock.c +++ b/usr.sbin/rpc.lockd/lockd_lock.c @@ -312,11 +312,14 @@ dump_netobj(const struct netobj *nobj) } } +/* #define DUMP_FILELOCK_VERBOSE */ void dump_filelock(const struct file_lock *fl) { +#ifdef DUMP_FILELOCK_VERBOSE char hbuff[MAXBUFFERSIZE*2]; char cbuff[MAXBUFFERSIZE]; +#endif if (debug_level < 2) { return; @@ -325,19 +328,19 @@ dump_filelock(const struct file_lock *fl) if (fl != NULL) { debuglog("Dumping file lock structure @ %p\n", fl); - /* +#ifdef DUMP_FILELOCK_VERBOSE dump_static_object((unsigned char *)&fl->filehandle, sizeof(fl->filehandle), hbuff, sizeof(hbuff), cbuff, sizeof(cbuff)); debuglog("Filehandle: %8s ::: %8s\n", hbuff, cbuff); - */ +#endif debuglog("Dumping nlm4_holder:\n" "exc: %x svid: %x offset:len %llx:%llx\n", fl->client.exclusive, fl->client.svid, fl->client.l_offset, fl->client.l_len); - /* +#ifdef DUMP_FILELOCK_VERBOSE debuglog("Dumping client identity:\n"); dump_netobj(&fl->client.oh); @@ -347,7 +350,7 @@ dump_filelock(const struct file_lock *fl) debuglog("nsm: %d status: %d flags: %d locker: %d" " fd: %d\n", fl->nsm_status, fl->status, fl->flags, fl->locker, fl->fd); - */ +#endif } else { debuglog("NULL file lock structure\n"); } @@ -1150,7 +1153,9 @@ unlock_hwlock(const struct file_lock *fl) } enum hwlock_status -test_hwlock(const struct file_lock *fl, struct file_lock **conflicting_fl) +test_hwlock(fl, conflicting_fl) + const struct file_lock *fl __unused; + struct file_lock **conflicting_fl __unused; { /* @@ -1840,7 +1845,7 @@ do_clear(const char *hostname) */ struct nlm4_holder * -testlock(struct nlm4_lock *lock, bool_t exclusive, int flags) +testlock(struct nlm4_lock *lock, bool_t exclusive, int flags __unused) { struct file_lock test_fl, *conflicting_fl; @@ -1940,7 +1945,7 @@ getlock(nlm4_lockargs *lckarg, struct svc_req *rqstp, const int flags) /* unlock a filehandle */ enum nlm_stats -unlock(nlm4_lock *lock, const int flags) +unlock(nlm4_lock *lock, const int flags __unused) { struct file_lock fl; enum nlm_stats err; @@ -2130,7 +2135,7 @@ notify(const char *hostname, const int state) void send_granted(fl, opcode) struct file_lock *fl; - int opcode; + int opcode __unused; { CLIENT *cli; static char dummy; |