From owner-svn-src-all@freebsd.org Mon May 21 00:17:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3F23EF8A66; Mon, 21 May 2018 00:17:43 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-eopbgr670085.outbound.protection.outlook.com [40.107.67.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT TLS CA 4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7A61F7AA3E; Mon, 21 May 2018 00:17:43 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTOPR0101MB0953.CANPRD01.PROD.OUTLOOK.COM (52.132.44.24) by YTOPR0101MB2265.CANPRD01.PROD.OUTLOOK.COM (52.132.51.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.776.11; Mon, 21 May 2018 00:17:41 +0000 Received: from YTOPR0101MB0953.CANPRD01.PROD.OUTLOOK.COM ([fe80::e15e:49f3:c225:a8de]) by YTOPR0101MB0953.CANPRD01.PROD.OUTLOOK.COM ([fe80::e15e:49f3:c225:a8de%13]) with mapi id 15.20.0776.015; Mon, 21 May 2018 00:17:41 +0000 From: Rick Macklem To: Matthew Macy CC: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r333924 - head/sys/fs/nfsclient Thread-Topic: svn commit: r333924 - head/sys/fs/nfsclient Thread-Index: AQHT8AHO3Ia6QcXkEUStxrPykfWmgqQ5LlDDgAARAICAAAHYgIAAEOpg Date: Mon, 21 May 2018 00:17:41 +0000 Message-ID: References: <201805200614.w4K6EC0L023252@repo.freebsd.org> , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=rmacklem@uoguelph.ca; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; YTOPR0101MB2265; 7:XeqFwmRHfJwrxyo/vhZ4BUcjZNxZyFLIJY+Wv9PfS1/GEdn+qXqf6NJ8V1xMysFdx+ZRzIrhOR579iaOpnU8Jjzi375ox8+H7aOQFyCrlaNhoTSllk++spHWhYQv3Oam05zWOGsc7EeVEFt46Z80zMZpbvdjANoJARHrxhZDrgzYOHkAHp+v2jxafD3FNT+AzmXAxUDMgzenhOwACoE79OXB5swQ0+CLwU6dsP5eRMuvgxkrLOp6g76Xvr9xKYb7 x-ms-exchange-antispam-srfa-diagnostics: SOS; x-microsoft-antispam: UriScan:(18154293887054); BCL:0; PCL:0; RULEID:(7020095)(4652020)(8989080)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(8990040)(2017052603328)(7153060)(7193020); SRVR:YTOPR0101MB2265; x-ms-traffictypediagnostic: YTOPR0101MB2265: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(56005881305849)(18154293887054); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231254)(944501410)(52105095)(93006095)(93001095)(149027)(150027)(6041310)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281529075)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:YTOPR0101MB2265; BCL:0; PCL:0; RULEID:; SRVR:YTOPR0101MB2265; x-forefront-prvs: 06793E740F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(346002)(376002)(39380400002)(396003)(39860400002)(69234005)(189003)(199004)(966005)(186003)(5250100002)(450100002)(6916009)(86362001)(6506007)(7696005)(3660700001)(6436002)(2900100001)(106356001)(105586002)(25786009)(74482002)(74316002)(99286004)(6246003)(476003)(53936002)(68736007)(53546011)(4326008)(305945005)(102836004)(316002)(229853002)(33656002)(55016002)(3280700002)(6306002)(478600001)(76176011)(9686003)(93886005)(26005)(786003)(81156014)(2906002)(486006)(8936002)(81166006)(11346002)(54906003)(14454004)(97736004)(446003)(8676002)(5660300001); DIR:OUT; SFP:1101; SCL:1; SRVR:YTOPR0101MB2265; H:YTOPR0101MB0953.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) x-microsoft-antispam-message-info: mIGL9M7/MYYkogrGId1JwKxk7DZtChsz4X2ZRL1nrXg9GdKX8QR1J2RDnFex+EgbUZpMZdpMGMUI3Tl2Ah/wlX/DTfeDP9iL7uX/YRLJwj36v8NP94IZ0VWDZP1gKRTznMuHqnuvsUgLEa8FFI8Iezf0RLkZaCuyumOETwTCbrL3Y5hVbTLUld5Mn9HeaknP spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: a66620c6-1770-4147-5939-08d5beb044a0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-Network-Message-Id: a66620c6-1770-4147-5939-08d5beb044a0 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 May 2018 00:17:41.6892 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTOPR0101MB2265 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 00:17:44 -0000 I'm not in a situation where I can use gcc, but if you email me the list of warnings, I can look at them. rick ________________________________________ From: Matthew Macy Sent: Sunday, May 20, 2018 7:16:31 PM To: Rick Macklem Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src-head@freeb= sd.org Subject: Re: svn commit: r333924 - head/sys/fs/nfsclient Actually if you could clean up the NFS code that would be great. It's _full_ of set but not used warnings. And anyone else reading this if you could clean up other areas. I've mostly cleaned up kern / net / netinet / iflib drivers. both WITHOUT_FORMAT_EXTENSIONS=3D XCC=3D/usr/local/bin/gcc8 make -j build= kernel and WITHOUT_FORMAT_EXTENSIONS=3D XCC=3D/usr/local/bin/gcc8 make -j buildkernel KERNCONF=3DGENERIC-NODEBUG Thanks. On Sun, May 20, 2018 at 4:09 PM, Matthew Macy wrote: > gcc8 > > On Sun, May 20, 2018 at 15:14 Rick Macklem wrote: >> >> Matt Macy wrote: >> >Author: mmacy >> >Date: Sun May 20 06:14:12 2018 >> >New Revision: 333924 >> >URL: https://svnweb.freebsd.org/changeset/base/333924 >> > >> >Log: >> > nfsclient: warnings cleanups >> Just wondering what compiler you are using. I haven't seen warnings for >> these? >> FYI, for the first two cases, ncookie is always set before it is used. >> For the third, "rflags" is set but not used. I sometimes leave code like >> this in >> the tree since I might need those argument flags later and might not >> remember >> how to get them. In this case, similar code in other functions set >> "rflags" in the >> same way, so it shouldn't be hard to crib the assignment from there. >> As such, I don't have a problem with deleting the code. >> >> rick >> ... the commit patch ... >> Modified: >> head/sys/fs/nfsclient/nfs_clcomsubs.c >> head/sys/fs/nfsclient/nfs_clrpcops.c >> >> Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c >> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 20 05:59:42 2018 >> (r333923) >> +++ head/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 20 06:14:12 2018 >> (r333924) >> @@ -354,7 +354,7 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct m= bu >> char *uiocp; >> struct mbuf *mp, *mp2, *firstmp; >> int xfer, left, mlen; >> - int uiosiz, clflg, rem; >> + int uiosiz, clflg; >> char *tcp; >> >> KASSERT(uiop->uio_iovcnt =3D=3D 1, ("nfsm_uiotombuf: iovcnt !=3D= 1")); >> @@ -363,7 +363,6 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct m= bu >> clflg =3D 1; >> else >> clflg =3D 0; >> - rem =3D NFSM_RNDUP(siz) - siz; >> if (clflg !=3D 0) >> NFSMCLGET(mp, M_WAITOK); >> else >> >> Modified: head/sys/fs/nfsclient/nfs_clrpcops.c >> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/fs/nfsclient/nfs_clrpcops.c Sun May 20 05:59:42 2018 >> (r333923) >> +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sun May 20 06:14:12 2018 >> (r333924) >> @@ -2845,7 +2845,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, >> nfsuint64 >> KASSERT(uiop->uio_iovcnt =3D=3D 1 && >> (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) =3D=3D 0, >> ("nfs readdirrpc bad uio")); >> - >> + ncookie.lval[0] =3D ncookie.lval[1] =3D 0; >> /* >> * There is no point in reading a lot more than uio_resid, howev= er >> * adding one additional DIRBLKSIZ makes sense. Since uio_resid >> @@ -3288,6 +3288,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, >> nfsui >> KASSERT(uiop->uio_iovcnt =3D=3D 1 && >> (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) =3D=3D 0, >> ("nfs readdirplusrpc bad uio")); >> + ncookie.lval[0] =3D ncookie.lval[1] =3D 0; >> timespecclear(&dctime); >> *attrflagp =3D 0; >> if (eofp !=3D NULL) >> @@ -6943,6 +6944,7 @@ nfsrv_parseug(struct nfsrv_descript *nd, int dogrp= , >> ui >> >> NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); >> len =3D fxdr_unsigned(uint32_t, *tl); >> + str =3D NULL; >> if (len > NFSV4_OPAQUELIMIT) { >> error =3D NFSERR_BADXDR; >> goto nfsmout; >> @@ -7244,7 +7246,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int >> namel >> struct nfsclsession *tsep; >> nfsattrbit_t attrbits; >> nfsv4stateid_t stateid; >> - uint32_t rflags; >> struct nfsmount *nmp; >> >> nmp =3D VFSTONFS(dvp->v_mount); >> @@ -7327,7 +7328,6 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int >> namel >> stateid.other[0] =3D *tl++; >> stateid.other[1] =3D *tl++; >> stateid.other[2] =3D *tl; >> - rflags =3D fxdr_unsigned(u_int32_t, *(tl + 6)); >> nfsrv_getattrbits(nd, &attrbits, NULL, NULL); >> NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); >> deleg =3D fxdr_unsigned(int, *tl); >> >