diff options
author | mdodd <mdodd@FreeBSD.org> | 2003-03-25 00:16:41 +0000 |
---|---|---|
committer | mdodd <mdodd@FreeBSD.org> | 2003-03-25 00:16:41 +0000 |
commit | 542566df0e2735ba5c4a6e8eb1f8984a69070c88 (patch) | |
tree | 56c057181a7b693e9bd923ee99feb1e54d1af1f1 /sbin/mount_nfs | |
parent | 783ae539c3e44d35afb500b405ff986b3033bc4a (diff) | |
download | FreeBSD-src-542566df0e2735ba5c4a6e8eb1f8984a69070c88.zip FreeBSD-src-542566df0e2735ba5c4a6e8eb1f8984a69070c88.tar.gz |
- Silence warnings (casting, implicit decl., unused var.).
- WARNS=2
Diffstat (limited to 'sbin/mount_nfs')
-rw-r--r-- | sbin/mount_nfs/Makefile | 2 | ||||
-rw-r--r-- | sbin/mount_nfs/mount_nfs.c | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/sbin/mount_nfs/Makefile b/sbin/mount_nfs/Makefile index 26f69c8..0d37514 100644 --- a/sbin/mount_nfs/Makefile +++ b/sbin/mount_nfs/Makefile @@ -9,7 +9,7 @@ MAN= mount_nfs.8 MOUNT= ${.CURDIR}/../mount UMNTALL= ${.CURDIR}/../../usr.sbin/rpc.umntall CFLAGS+= -DNFS -I${MOUNT} -I${UMNTALL} -WARNS= 0 +WARNS= 2 .PATH: ${MOUNT} ${UMNTALL} diff --git a/sbin/mount_nfs/mount_nfs.c b/sbin/mount_nfs/mount_nfs.c index c6af571..7bbfa7e 100644 --- a/sbin/mount_nfs/mount_nfs.c +++ b/sbin/mount_nfs/mount_nfs.c @@ -72,6 +72,7 @@ static const char rcsid[] = #include <netdb.h> #include <stdio.h> #include <stdlib.h> +#include <string.h> #include <strings.h> #include <sysexits.h> #include <unistd.h> @@ -248,7 +249,7 @@ main(argc, argv) int c; struct nfs_args *nfsargsp; struct nfs_args nfsargs; - int mntflags, altflags, nfssvc_flag, num; + int mntflags, altflags, num; char *name, *p, *spec; char mntpath[MAXPATHLEN]; @@ -690,7 +691,8 @@ tryagain: try.tv_sec = 10; try.tv_usec = 0; - stat = clnt_call(clp, NFSPROC_NULL, xdr_void, NULL, xdr_void, NULL, + stat = clnt_call(clp, NFSPROC_NULL, (xdrproc_t)xdr_void, NULL, + (xdrproc_t)xdr_void, NULL, try); if (stat != RPC_SUCCESS) { if (stat == RPC_PROGVERSMISMATCH && trymntmode == ANY) { @@ -719,7 +721,8 @@ tryagain: clp->cl_auth = authsys_create_default(); nfhret.auth = RPCAUTH_UNIX; nfhret.vers = mntvers; - stat = clnt_call(clp, RPCMNT_MOUNT, xdr_dir, spec, xdr_fh, &nfhret, + stat = clnt_call(clp, RPCMNT_MOUNT, (xdrproc_t)xdr_dir, spec, + (xdrproc_t)xdr_fh, &nfhret, try); auth_destroy(clp->cl_auth); if (stat != RPC_SUCCESS) { |