From nobody Wed Mar 29 00:11:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PmRm76j75z42d0N; Wed, 29 Mar 2023 00:11:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PmRm74nr8z3R8S; Wed, 29 Mar 2023 00:11:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680048663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6TamDH7/ZQgMqMpvWgJccPucf3y6jgOhh+bpNQY865M=; b=h+Q16CivMqeYlxKJXjqP2WP5DAfSN9+Pklm0q107Y4uh+i1KK5oVHqipNQDlhZkVftvsF/ R1FBKjos/B57lBAzXhhVPIkpK697VM/molYR9TCQMo9bBjVGgwpeiGRodaQ0xsGw7458+R YRRXpMQs2W0vskuZmGsTN+7lGhMD+ajaMN+nbvd6OyqgwVq7MdugQLheB3zNijpd1Gt471 eWuE4qonK87J0tK0DwbI6o0ksAVAOdGvHsVcYnslo+oz5AAclexRwNdX0m44nFUiLRbiwM R5aD9+/wACA4O1jJMadGq7milys74xbkB9faaRv4nuOcCVxKG434kDYub/pSWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680048663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6TamDH7/ZQgMqMpvWgJccPucf3y6jgOhh+bpNQY865M=; b=gnD+qCS83E0BomskT4qSsNOVc8TobGHVAy9fLxFE+8MM+ff8/Wm/Q3sqQXrMQ9gZT/FxgA yhpX0He3MHH9Gk9sGRa/cr+Wsr1/6XvVlSek7zqKg/XbABfspgE4wJhJ6xNlnH8SwbI5w/ s2OO59Ea1UERaboYPySxo35GJYv4QnPIlUn0QLUz+YbrlRBZsV3ITGcx4m4S8aene/DsIC iBPAP4L6vAeOTGU+GBcqmpblSrgHuV37eySrZV+iGkbljUKBAIS7DmNRknbdF14HhomJYJ lSxd5E4EelwbPU/D7xIWix/VzumJmT0boLTk13L+PbswHxxmJcZc+rb98v/8mQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680048663; a=rsa-sha256; cv=none; b=cCq/OmaCqjfz/f3uv4p8aX+m7FkcZYHzV5z6YFYU3UKEttCDBhznE4gsijceN2KGhmg709 ubxH9xz4L/hbp/kNIlFV9PtZV6So09gCZ4aZT9IOqv8H7PgrOIV3ZxDAtnee+5rQ+ugzQ9 yrt5vNCiA8AAPNUcoMj8CckkqcNgRNU4P1+DD4smghoeV70WZaSclbR56cytj5iJhwBCRV bp87J+RkBlKrIn1L2GSVpcEPl2ut60046/Loi4J2lz/7lNUGlzE7ghgsyn444418F5plEg oBlL5rU2UB4MO/1gZwPR87ym2QQTsgN4r08a6qtPDYD69UFk1JrrqbyYJbHc6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PmRm73rLMz1NKN; Wed, 29 Mar 2023 00:11:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32T0B3Nw087671; Wed, 29 Mar 2023 00:11:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32T0B36T087670; Wed, 29 Mar 2023 00:11:03 GMT (envelope-from git) Date: Wed, 29 Mar 2023 00:11:03 GMT Message-Id: <202303290011.32T0B36T087670@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 695d87bae1ec - main - nfscl: Make coverity happy List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 695d87bae1ec826fcf796f99b9de9cdd8c37fb8c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=695d87bae1ec826fcf796f99b9de9cdd8c37fb8c commit 695d87bae1ec826fcf796f99b9de9cdd8c37fb8c Author: Rick Macklem AuthorDate: 2023-03-29 00:08:45 +0000 Commit: Rick Macklem CommitDate: 2023-03-29 00:08:45 +0000 nfscl: Make coverity happy Coverity does not like code that checks a function's return value sometimes. Add "(void)" in front of the function when the return value does not matter to try and make it happy. A recent commit deleted "(void)"s in front of nfsm_fhtom(). This commit puts them back in. Reported by: emaste MFC after: 3 months --- sys/fs/nfs/nfs_commonsubs.c | 4 ++-- sys/fs/nfsclient/nfs_clrpcops.c | 20 ++++++++++---------- sys/fs/nfsserver/nfs_nfsdserv.c | 18 +++++++++--------- sys/fs/nfsserver/nfs_nfsdstate.c | 6 +++--- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index 9e70eea522c4..48798087b177 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -437,7 +437,7 @@ nfscl_reqstart(struct nfsrv_descript *nd, int procnum, struct nfsmount *nmp, if (nfsv4_opflag[nfsv4_opmap[procnum].op].needscfh > 0) { NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_PUTFH); - nfsm_fhtom(nmp, nd, nfhp, fhlen, 0); + (void)nfsm_fhtom(nmp, nd, nfhp, fhlen, 0); if (nfsv4_opflag[nfsv4_opmap[procnum].op].needscfh == 2 && procnum != NFSPROC_WRITEDS && procnum != NFSPROC_COMMITDS) { @@ -468,7 +468,7 @@ nfscl_reqstart(struct nfsrv_descript *nd, int procnum, struct nfsmount *nmp, *tl = txdr_unsigned(nfsv4_opmap[procnum].op); } } else { - nfsm_fhtom(NULL, nd, nfhp, fhlen, 0); + (void)nfsm_fhtom(NULL, nd, nfhp, fhlen, 0); } if (procnum < NFSV42_NPROCS) NFSINCRGLOBAL(nfsstatsv1.rpccnt[procnum]); diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 9a8e7436f620..70c7619e679a 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -2585,7 +2585,7 @@ nfsrpc_createv4(vnode_t dvp, char *name, int namelen, struct vattr *vap, /* Get the directory's post-op attributes. */ NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_PUTFH); - nfsm_fhtom(nmp, nd, np->n_fhp->nfh_fh, np->n_fhp->nfh_len, 0); + (void)nfsm_fhtom(nmp, nd, np->n_fhp->nfh_fh, np->n_fhp->nfh_len, 0); NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_GETATTR); (void) nfsrv_putattrbit(nd, &attrbits); @@ -2785,7 +2785,7 @@ tryagain: *tl++ = dstateid.other[2]; *tl = txdr_unsigned(NFSV4OP_PUTFH); np = VTONFS(dvp); - nfsm_fhtom(nmp, nd, np->n_fhp->nfh_fh, + (void)nfsm_fhtom(nmp, nd, np->n_fhp->nfh_fh, np->n_fhp->nfh_len, 0); NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_REMOVE); @@ -2873,7 +2873,7 @@ tryagain: NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_PUTFH); np = VTONFS(tvp); - nfsm_fhtom(nmp, nd, np->n_fhp->nfh_fh, + (void)nfsm_fhtom(nmp, nd, np->n_fhp->nfh_fh, np->n_fhp->nfh_len, 0); NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_DELEGRETURN); @@ -2893,7 +2893,7 @@ tryagain: NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_PUTFH); np = VTONFS(fdvp); - nfsm_fhtom(nmp, nd, np->n_fhp->nfh_fh, + (void)nfsm_fhtom(nmp, nd, np->n_fhp->nfh_fh, np->n_fhp->nfh_len, 0); NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_SAVEFH); @@ -2910,7 +2910,7 @@ tryagain: (void) nfsrv_putattrbit(nd, &attrbits); NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_PUTFH); - nfsm_fhtom(nmp, nd, VTONFS(tdvp)->n_fhp->nfh_fh, + (void)nfsm_fhtom(nmp, nd, VTONFS(tdvp)->n_fhp->nfh_fh, VTONFS(tdvp)->n_fhp->nfh_len, 0); NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_GETATTR); @@ -2921,7 +2921,7 @@ tryagain: } (void) nfsm_strtom(nd, fnameptr, fnamelen); if (!(nd->nd_flag & ND_NFSV4)) - nfsm_fhtom(nmp, nd, VTONFS(tdvp)->n_fhp->nfh_fh, + (void)nfsm_fhtom(nmp, nd, VTONFS(tdvp)->n_fhp->nfh_fh, VTONFS(tdvp)->n_fhp->nfh_len, 0); (void) nfsm_strtom(nd, tnameptr, tnamelen); error = nfscl_request(nd, fdvp, p, cred); @@ -3006,7 +3006,7 @@ nfsrpc_link(vnode_t dvp, vnode_t vp, char *name, int namelen, NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_PUTFH); } - nfsm_fhtom(VFSTONFS(dvp->v_mount), nd, VTONFS(dvp)->n_fhp->nfh_fh, + (void)nfsm_fhtom(VFSTONFS(dvp->v_mount), nd, VTONFS(dvp)->n_fhp->nfh_fh, VTONFS(dvp)->n_fhp->nfh_len, 0); if (nd->nd_flag & ND_NFSV4) { NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); @@ -3146,7 +3146,7 @@ nfsrpc_mkdir(vnode_t dvp, char *name, int namelen, struct vattr *vap, (void) nfsrv_putattrbit(nd, &attrbits); NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_PUTFH); - nfsm_fhtom(nmp, nd, fhp->nfh_fh, fhp->nfh_len, 0); + (void)nfsm_fhtom(nmp, nd, fhp->nfh_fh, fhp->nfh_len, 0); NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_GETATTR); (void) nfsrv_putattrbit(nd, &attrbits); @@ -8230,7 +8230,7 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int namelen, struct vattr *vap, /* Get the directory's post-op attributes. */ NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_PUTFH); - nfsm_fhtom(nmp, nd, np->n_fhp->nfh_fh, np->n_fhp->nfh_len, 0); + (void)nfsm_fhtom(nmp, nd, np->n_fhp->nfh_fh, np->n_fhp->nfh_len, 0); NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_GETATTR); nfsrv_putattrbit(nd, &attrbits); @@ -8635,7 +8635,7 @@ nfsrpc_copyrpc(vnode_t invp, off_t inoff, vnode_t outvp, off_t outoff, nfsrv_putattrbit(nd, &attrbits); NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_PUTFH); - nfsm_fhtom(nmp, nd, VTONFS(outvp)->n_fhp->nfh_fh, + (void)nfsm_fhtom(nmp, nd, VTONFS(outvp)->n_fhp->nfh_fh, VTONFS(outvp)->n_fhp->nfh_len, 0); NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_COPY); diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c index cf88e5ea4ebe..01ecf0b09ebd 100644 --- a/sys/fs/nfsserver/nfs_nfsdserv.c +++ b/sys/fs/nfsserver/nfs_nfsdserv.c @@ -672,10 +672,10 @@ nfsrvd_lookup(struct nfsrv_descript *nd, __unused int isdgram, goto out; } if (nd->nd_flag & ND_NFSV2) { - nfsm_fhtom(NULL, nd, (u_int8_t *)fhp, 0, 0); + (void)nfsm_fhtom(NULL, nd, (u_int8_t *)fhp, 0, 0); nfsrv_fillattr(nd, &nva); } else if (nd->nd_flag & ND_NFSV3) { - nfsm_fhtom(NULL, nd, (u_int8_t *)fhp, 0, 0); + (void)nfsm_fhtom(NULL, nd, (u_int8_t *)fhp, 0, 0); nfsrv_postopattr(nd, 0, &nva); nfsrv_postopattr(nd, dattr_ret, &dattr); } @@ -1282,7 +1282,7 @@ nfsrvd_create(struct nfsrv_descript *nd, __unused int isdgram, } if (nd->nd_flag & ND_NFSV2) { if (!nd->nd_repstat) { - nfsm_fhtom(NULL, nd, (u_int8_t *)&fh, 0, 0); + (void)nfsm_fhtom(NULL, nd, (u_int8_t *)&fh, 0, 0); nfsrv_fillattr(nd, &nva); } } else { @@ -1292,7 +1292,7 @@ nfsrvd_create(struct nfsrv_descript *nd, __unused int isdgram, diraft_ret = nfsvno_getattr(dirp, &diraft, nd, p, 0, NULL); vrele(dirp); if (!nd->nd_repstat) { - nfsm_fhtom(NULL, nd, (u_int8_t *)&fh, 0, 1); + (void)nfsm_fhtom(NULL, nd, (u_int8_t *)&fh, 0, 1); nfsrv_postopattr(nd, 0, &nva); } nfsrv_wcc(nd, dirfor_ret, &dirfor, diraft_ret, &diraft); @@ -1492,7 +1492,7 @@ nfsrvd_mknod(struct nfsrv_descript *nd, __unused int isdgram, vrele(dirp); if (!nd->nd_repstat) { if (nd->nd_flag & ND_NFSV3) { - nfsm_fhtom(NULL, nd, (u_int8_t *)fhp, 0, 1); + (void)nfsm_fhtom(NULL, nd, (u_int8_t *)fhp, 0, 1); nfsrv_postopattr(nd, 0, &nva); } else { NFSM_BUILD(tl, u_int32_t *, 5 * NFSX_UNSIGNED); @@ -1946,7 +1946,7 @@ nfsrvd_symlink(struct nfsrv_descript *nd, __unused int isdgram, if (nd->nd_flag & ND_NFSV3) { if (!nd->nd_repstat) { - nfsm_fhtom(NULL, nd, (u_int8_t *)fhp, 0, 1); + (void)nfsm_fhtom(NULL, nd, (u_int8_t *)fhp, 0, 1); nfsrv_postopattr(nd, 0, &nva); } nfsrv_wcc(nd, dirfor_ret, &dirfor, diraft_ret, &diraft); @@ -2070,12 +2070,12 @@ nfsrvd_mkdir(struct nfsrv_descript *nd, __unused int isdgram, if (nd->nd_flag & ND_NFSV3) { if (!nd->nd_repstat) { - nfsm_fhtom(NULL, nd, (u_int8_t *)fhp, 0, 1); + (void)nfsm_fhtom(NULL, nd, (u_int8_t *)fhp, 0, 1); nfsrv_postopattr(nd, 0, &nva); } nfsrv_wcc(nd, dirfor_ret, &dirfor, diraft_ret, &diraft); } else if (!nd->nd_repstat) { - nfsm_fhtom(NULL, nd, (u_int8_t *)fhp, 0, 0); + (void)nfsm_fhtom(NULL, nd, (u_int8_t *)fhp, 0, 0); nfsrv_fillattr(nd, &nva); } @@ -3462,7 +3462,7 @@ nfsrvd_getfh(struct nfsrv_descript *nd, __unused int isdgram, nd->nd_repstat = nfsvno_getfh(vp, &fh, p); vput(vp); if (!nd->nd_repstat) - nfsm_fhtom(NULL, nd, (u_int8_t *)&fh, 0, 0); + (void)nfsm_fhtom(NULL, nd, (u_int8_t *)&fh, 0, 0); NFSEXITCODE2(0, nd); return (0); } diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c index 267b030d8d65..4a552298671e 100644 --- a/sys/fs/nfsserver/nfs_nfsdstate.c +++ b/sys/fs/nfsserver/nfs_nfsdstate.c @@ -4529,7 +4529,7 @@ nfsrv_docallback(struct nfsclient *clp, int procnum, nfsv4stateid_t *stateidp, m_freem(nd->nd_mreq); goto errout; } - nfsm_fhtom(NULL, nd, (u_int8_t *)fhp, NFSX_MYFH, 0); + (void)nfsm_fhtom(NULL, nd, (u_int8_t *)fhp, NFSX_MYFH, 0); (void)nfsrv_putattrbit(nd, attrbitp); } else if (procnum == NFSV4OP_CBRECALL) { nd->nd_procnum = NFSV4PROC_CBCOMPOUND; @@ -4548,7 +4548,7 @@ nfsrv_docallback(struct nfsclient *clp, int procnum, nfsv4stateid_t *stateidp, *tl = newnfs_true; else *tl = newnfs_false; - nfsm_fhtom(NULL, nd, (u_int8_t *)fhp, NFSX_MYFH, 0); + (void)nfsm_fhtom(NULL, nd, (u_int8_t *)fhp, NFSX_MYFH, 0); } else if (procnum == NFSV4OP_CBLAYOUTRECALL) { NFSD_DEBUG(4, "docallback layout recall\n"); nd->nd_procnum = NFSV4PROC_CBCOMPOUND; @@ -4567,7 +4567,7 @@ nfsrv_docallback(struct nfsclient *clp, int procnum, nfsv4stateid_t *stateidp, else *tl++ = newnfs_false; *tl = txdr_unsigned(NFSV4LAYOUTRET_FILE); - nfsm_fhtom(NULL, nd, (uint8_t *)fhp, NFSX_MYFH, 0); + (void)nfsm_fhtom(NULL, nd, (uint8_t *)fhp, NFSX_MYFH, 0); NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_HYPER + NFSX_STATEID); tval = 0; txdr_hyper(tval, tl); tl += 2;