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.
This commit is contained in:
Rick Macklem 2019-12-13 21:38:08 +00:00
parent 4b28d96e5d
commit f808cf7294
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=355733
4 changed files with 8 additions and 6 deletions

View File

@ -5001,6 +5001,8 @@ nfsrpc_getdeviceinfo(struct nfsmount *nmp, uint8_t *deviceid, int layouttype,
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 *sin,
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"));

View File

@ -4670,7 +4670,7 @@ nfsrv_dsgetsockmnt(struct vnode *vp, int lktype, char *buf, int *buflenp,
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;

View File

@ -4594,7 +4594,7 @@ nfsrvd_layoutcommit(struct nfsrv_descript *nd, __unused int isdgram,
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;

View File

@ -4056,10 +4056,10 @@ nfsrv_getclientipaddr(struct nfsrv_descript *nd, struct nfsclient *clp)
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);