mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-03 23:28:58 +00:00
- Silence warnings (casting, implicit decl., unused var.).
- WARNS=2
This commit is contained in:
parent
227f9a1c58
commit
c04affffc1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=112570
|
@ -9,7 +9,7 @@ MAN= mount_nfs.8
|
||||||
MOUNT= ${.CURDIR}/../mount
|
MOUNT= ${.CURDIR}/../mount
|
||||||
UMNTALL= ${.CURDIR}/../../usr.sbin/rpc.umntall
|
UMNTALL= ${.CURDIR}/../../usr.sbin/rpc.umntall
|
||||||
CFLAGS+= -DNFS -I${MOUNT} -I${UMNTALL}
|
CFLAGS+= -DNFS -I${MOUNT} -I${UMNTALL}
|
||||||
WARNS= 0
|
WARNS= 2
|
||||||
|
|
||||||
.PATH: ${MOUNT} ${UMNTALL}
|
.PATH: ${MOUNT} ${UMNTALL}
|
||||||
|
|
||||||
|
|
|
@ -72,6 +72,7 @@ static const char rcsid[] =
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
#include <sysexits.h>
|
#include <sysexits.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -248,7 +249,7 @@ main(argc, argv)
|
||||||
int c;
|
int c;
|
||||||
struct nfs_args *nfsargsp;
|
struct nfs_args *nfsargsp;
|
||||||
struct nfs_args nfsargs;
|
struct nfs_args nfsargs;
|
||||||
int mntflags, altflags, nfssvc_flag, num;
|
int mntflags, altflags, num;
|
||||||
char *name, *p, *spec;
|
char *name, *p, *spec;
|
||||||
char mntpath[MAXPATHLEN];
|
char mntpath[MAXPATHLEN];
|
||||||
|
|
||||||
|
@ -690,7 +691,8 @@ nfs_tryproto(struct nfs_args *nfsargsp, struct addrinfo *ai, char *hostp,
|
||||||
|
|
||||||
try.tv_sec = 10;
|
try.tv_sec = 10;
|
||||||
try.tv_usec = 0;
|
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);
|
try);
|
||||||
if (stat != RPC_SUCCESS) {
|
if (stat != RPC_SUCCESS) {
|
||||||
if (stat == RPC_PROGVERSMISMATCH && trymntmode == ANY) {
|
if (stat == RPC_PROGVERSMISMATCH && trymntmode == ANY) {
|
||||||
|
@ -719,7 +721,8 @@ nfs_tryproto(struct nfs_args *nfsargsp, struct addrinfo *ai, char *hostp,
|
||||||
clp->cl_auth = authsys_create_default();
|
clp->cl_auth = authsys_create_default();
|
||||||
nfhret.auth = RPCAUTH_UNIX;
|
nfhret.auth = RPCAUTH_UNIX;
|
||||||
nfhret.vers = mntvers;
|
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);
|
try);
|
||||||
auth_destroy(clp->cl_auth);
|
auth_destroy(clp->cl_auth);
|
||||||
if (stat != RPC_SUCCESS) {
|
if (stat != RPC_SUCCESS) {
|
||||||
|
|
Loading…
Reference in a new issue