From owner-svn-src-head@freebsd.org Sun May 20 22:14:55 2018 Return-Path: Delivered-To: svn-src-head@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 CEA6AEF1CCC; Sun, 20 May 2018 22:14:55 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-QB1-obe.outbound.protection.outlook.com (mail-eopbgr660075.outbound.protection.outlook.com [40.107.66.75]) (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 5B47C73AB7; Sun, 20 May 2018 22:14:54 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTOPR0101MB0953.CANPRD01.PROD.OUTLOOK.COM (52.132.44.24) by YTOPR0101MB2185.CANPRD01.PROD.OUTLOOK.COM (52.132.48.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.776.11; Sun, 20 May 2018 22:14:53 +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; Sun, 20 May 2018 22:14:53 +0000 From: Rick Macklem To: Matt Macy , "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: AQHT8AHO3Ia6QcXkEUStxrPykfWmgqQ5LlDD Date: Sun, 20 May 2018 22:14:53 +0000 Message-ID: References: <201805200614.w4K6EC0L023252@repo.freebsd.org> In-Reply-To: <201805200614.w4K6EC0L023252@repo.freebsd.org> 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; YTOPR0101MB2185; 7:/XZl0fTeiigV5qxanc3K4FVefCWSOvZGbkMCYezMma9GFKCSlVA6fon5QFvA5vWJ+Jna7tuJZtzN/akWRzrKfV6ps0l0G3UOS+0MmGG3TMWEIL3CNEZazdSfb4qn835kmekGY1DYI8duDkkYcBU9PG2YCEXI8AbjFJ04gTeyaUU3SLIkt43d8duTcxhjBeGOeSiYR/1FHnqOx0LTD/iPXWxT3vKfrKpICUHbUZlYl+2SzZQPNoB3r/vu8086WCYm x-ms-exchange-antispam-srfa-diagnostics: SOS; x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(8989080)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(8990040)(2017052603328)(7153060)(7193020); SRVR:YTOPR0101MB2185; x-ms-traffictypediagnostic: YTOPR0101MB2185: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(56005881305849); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(3231254)(944501410)(52105095)(3002001)(93006095)(93001095)(10201501046)(149027)(150027)(6041310)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281529075)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:YTOPR0101MB2185; BCL:0; PCL:0; RULEID:; SRVR:YTOPR0101MB2185; x-forefront-prvs: 06780E24F8 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(39860400002)(396003)(39380400002)(366004)(346002)(69234005)(189003)(199004)(2906002)(55016002)(9686003)(6306002)(74316002)(786003)(110136005)(14454004)(33656002)(316002)(25786009)(74482002)(2900100001)(3280700002)(5660300001)(305945005)(3660700001)(966005)(106356001)(97736004)(105586002)(478600001)(68736007)(450100002)(6436002)(53936002)(476003)(6246003)(8676002)(229853002)(81166006)(81156014)(8936002)(99286004)(5250100002)(26005)(6506007)(2501003)(446003)(102836004)(86362001)(11346002)(2201001)(186003)(7696005)(486006)(76176011); DIR:OUT; SFP:1101; SCL:1; SRVR:YTOPR0101MB2185; 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: w1EYTHxFLg5zH/B9yYdTmr3cIR1LGO7rqJGM/+0EWUBMEFWLdubwjjZ8q69QtMn1JrZAZ6EWkRzreg28LjBPMcgXLZ3WFweDQuPbaro7G9HVbME6ams6WMPH+hSvkwAvAPfAQRgodjLBgs70UznYA174IhdJ3wI/WgfpqAHhQSbtqYWeyZNwiqyzZAV6UKEh spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 98ed2d96-e264-458f-c73d-08d5be9f1ca7 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-Network-Message-Id: 98ed2d96-e264-458f-c73d-08d5be9f1ca7 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 May 2018 22:14:53.1378 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTOPR0101MB2185 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 22:14:56 -0000 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 the= se? 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 th= is in the tree since I might need those argument flags later and might not rememb= er 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 mbu 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 mbu 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, nfsuint6= 4 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, however * adding one additional DIRBLKSIZ makes sense. Since uio_resid @@ -3288,6 +3288,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsu= i 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, u= i 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 name= l 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 name= l 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);