Date: Fri, 13 Dec 2019 21:38:08 +0000 (UTC) From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r355733 - in head/sys/fs: nfsclient nfsserver Message-ID: <201912132138.xBDLc8fU042276@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rmacklem Date: Fri Dec 13 21:38:08 2019 New Revision: 355733 URL: https://svnweb.freebsd.org/changeset/base/355733 Log: Silence some "might not be initialized" warnings for riscv64. None of these case were actually using the variable(s) uninitialized, but I figured that silencing the warnings via initializing them made sense. Some of these predated r355677. Modified: head/sys/fs/nfsclient/nfs_clrpcops.c head/sys/fs/nfsserver/nfs_nfsdport.c head/sys/fs/nfsserver/nfs_nfsdserv.c head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Fri Dec 13 21:03:12 2019 (r355732) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Fri Dec 13 21:38:08 2019 (r355733) @@ -5001,6 +5001,8 @@ nfsrpc_getdeviceinfo(struct nfsmount *nmp, uint8_t *de uint8_t stripeindex; sa_family_t af, safilled; + ssin.sin_port = 0; /* To shut up compiler. */ + ssin.sin_addr.s_addr = 0; /* ditto */ *ndip = NULL; ndi = NULL; gotdspp = NULL; @@ -5436,7 +5438,7 @@ nfsrpc_fillsa(struct nfsmount *nmp, struct sockaddr_in struct nfsclds *dsp, *tdsp; int error, firsttry; enum nfsclds_state retv; - uint32_t sequenceid; + uint32_t sequenceid = 0; KASSERT(nmp->nm_sockreq.nr_cred != NULL, ("nfsrpc_fillsa: NULL nr_cred")); Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Fri Dec 13 21:03:12 2019 (r355732) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Fri Dec 13 21:38:08 2019 (r355733) @@ -4670,7 +4670,7 @@ nfsrv_dsgetsockmnt(struct vnode *vp, int lktype, char char *devid, char *fnamep, struct vnode **nvpp, struct nfsmount **newnmpp, struct nfsmount *curnmp, int *ippos, int *dsdirp) { - struct vnode *dvp, *nvp, **tdvpp; + struct vnode *dvp, *nvp = NULL, **tdvpp; struct mount *mp; struct nfsmount *nmp, *newnmp; struct sockaddr *sad; Modified: head/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdserv.c Fri Dec 13 21:03:12 2019 (r355732) +++ head/sys/fs/nfsserver/nfs_nfsdserv.c Fri Dec 13 21:38:08 2019 (r355733) @@ -4594,7 +4594,7 @@ nfsrvd_layoutcommit(struct nfsrv_descript *nd, __unuse nfsv4stateid_t stateid; int error = 0, hasnewoff, hasnewmtime, layouttype, maxcnt, reclaim; int hasnewsize; - uint64_t offset, len, newoff, newsize; + uint64_t offset, len, newoff = 0, newsize; struct timespec newmtime; char *layp; struct thread *p = curthread; Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdstate.c Fri Dec 13 21:03:12 2019 (r355732) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Fri Dec 13 21:38:08 2019 (r355733) @@ -4056,10 +4056,10 @@ nfsrv_getclientipaddr(struct nfsrv_descript *nd, struc int i, j, maxalen = 0, minalen = 0; sa_family_t af; #ifdef INET - struct sockaddr_in *rin, *sin; + struct sockaddr_in *rin = NULL, *sin; #endif #ifdef INET6 - struct sockaddr_in6 *rin6, *sin6; + struct sockaddr_in6 *rin6 = NULL, *sin6; #endif u_char *addr; int error = 0, cantparse = 0; @@ -7075,7 +7075,7 @@ nfsrv_recalloldlayout(NFSPROC_T *p) nfsquad_t clientid; nfsv4stateid_t stateid; fhandle_t fh; - int error, laytype, ret; + int error, laytype = 0, ret; lhyp = &nfslayouthash[arc4random() % nfsrv_layouthashsize]; NFSLOCKLAYOUT(lhyp);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912132138.xBDLc8fU042276>