Date: Tue, 28 May 2019 08:31:13 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 238167] fs/nfsclient/nfs_clvnops.c: suspicious "if" statement Message-ID: <bug-238167-227-qm8y7HO2C9@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-238167-227@https.bugs.freebsd.org/bugzilla/> References: <bug-238167-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D238167 --- Comment #1 from Alexey Dokuchaev <danfe@FreeBSD.org> --- Also, in the same file, there's another warning: /usr/src/sys/fs/nfsclient/nfs_clvnops.c:1187:1: warning: V519 The 'error' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1184, 1187: > 191783 rmacklem error =3D 0; > 191783 rmacklem newvp =3D NULLVP; > 304026 rmacklem NFSINCRGLOBAL(nfsstatsv1.lookupcache_misses); > 191783 rmacklem error =3D nfsrpc_lookup(dvp, ...); You might also reconsider needless local variable initialization on line 24= 96 (it is explicitly assigned three lines below): > 191783 rmacklem int error =3D 0, attrflag, dattrflag; > 191783 rmacklem u_int hash; > 191783 rmacklem > 191783 rmacklem error =3D nfsrpc_lookup(dvp, ...); --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-238167-227-qm8y7HO2C9>