From owner-svn-src-all@freebsd.org Sun Jun 3 22:15:49 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 56FBFFE45D2; Sun, 3 Jun 2018 22:15:49 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-eopbgr670056.outbound.protection.outlook.com [40.107.67.56]) (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 D33CD80654; Sun, 3 Jun 2018 22:15:48 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTOPR0101MB0953.CANPRD01.PROD.OUTLOOK.COM (52.132.44.24) by YTOPR0101MB1865.CANPRD01.PROD.OUTLOOK.COM (52.132.48.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.820.13; Sun, 3 Jun 2018 22:15:47 +0000 Received: from YTOPR0101MB0953.CANPRD01.PROD.OUTLOOK.COM ([fe80::a860:9237:2e9f:f87f]) by YTOPR0101MB0953.CANPRD01.PROD.OUTLOOK.COM ([fe80::a860:9237:2e9f:f87f%3]) with mapi id 15.20.0820.015; Sun, 3 Jun 2018 22:15:47 +0000 From: Rick Macklem To: Dimitry Andric , Rick Macklem CC: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r334586 - head/sys/fs/nfsserver Thread-Topic: svn commit: r334586 - head/sys/fs/nfsserver Thread-Index: AQHT+4YVJyrXGoCjUUiu9sjs/OUO7KRPF+u9 Date: Sun, 3 Jun 2018 22:15:47 +0000 Message-ID: References: <201806031946.w53JkiHm084473@repo.freebsd.org>, <2231964C-8130-416D-963D-77F93DF2F08A@FreeBSD.org> In-Reply-To: <2231964C-8130-416D-963D-77F93DF2F08A@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; YTOPR0101MB1865; 7:32u/OZ4oCvUc536GBtN7RPABSLfwH3YYbCMLZVjvc2mBO8C2TlnRuGUAGcyoCxtbyHFGcKecyE6XafofEFHnjW6fLXtBNZ9b9+/AfXFFZPB14/Hx8B+3KpgKI5UGu4/BA4oPKlfeMFZfpDmbip9h0ttEfNPWIs2EoEuu32OL7002jKJHvnWKlpvDVAZRZbvjFxflGkqrzppsIft1Um+EFTPcC7JiOJGZLOfkd8tc3zhm2PC11f/WQgkL/iqIGXim 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:YTOPR0101MB1865; x-ms-traffictypediagnostic: YTOPR0101MB1865: 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)(93006095)(93001095)(3002001)(10201501046)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(201703131423095)(201702281529075)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:YTOPR0101MB1865; BCL:0; PCL:0; RULEID:; SRVR:YTOPR0101MB1865; x-forefront-prvs: 069255B8B8 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(346002)(366004)(39380400002)(39860400002)(396003)(199004)(189003)(105586002)(74316002)(305945005)(186003)(59450400001)(7696005)(486006)(99286004)(76176011)(446003)(11346002)(476003)(68736007)(2906002)(316002)(33656002)(3660700001)(3280700002)(97736004)(5250100002)(54906003)(786003)(26005)(966005)(86362001)(25786009)(6246003)(229853002)(2900100001)(110136005)(5660300001)(478600001)(102836004)(8676002)(8936002)(6436002)(81166006)(9686003)(81156014)(6306002)(106356001)(6506007)(74482002)(450100002)(55016002)(53936002)(4326008)(14454004)(3714002); DIR:OUT; SFP:1101; SCL:1; SRVR:YTOPR0101MB1865; H:YTOPR0101MB0953.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) x-microsoft-antispam-message-info: JPtCxuR/UNaFLp/abvt01FFk6Qyw42JNTqk/c3ZaFU4nLK0H8opeITMyWx7M9lnP28W2BoUnU1FS3F0DG0O4B5pvYwpMduIoLXSUmUooN8ryCZ0uq5gBJiSgaBo4QG4aX7pTh3UfxsnJVvhHYm6Ob+qwD5dvIaP/30ilIFOSvp5EMIlgmT7M0tpL8hQXKBQf 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: f29943f8-57db-4320-d9f2-08d5c99f8ee5 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-Network-Message-Id: f29943f8-57db-4320-d9f2-08d5c99f8ee5 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jun 2018 22:15:47.6891 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTOPR0101MB1865 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: Sun, 03 Jun 2018 22:15:49 -0000 Dimitry Andric wrote: >On 3 Jun 2018, at 21:46, Rick Macklem wrote: >> >> Author: rmacklem >> Date: Sun Jun 3 19:46:44 2018 >> New Revision: 334586 >> URL: https://svnweb.freebsd.org/changeset/base/334586 >> >> Log: >> Fix a gcc8 warning about a write only variable. >> >> gcc8 warns that "verf" was set but not used. This was because the code >> that uses it is disabled via a "#if 0". >> This patch adds a "#if 0" to the variable's declaration and assignment >> to get rid of the warning. >> This way the code could be re-enabled without difficulty. >> >> Requested by: mmacy >> MFC after: 2 weeks >> >> Modified: >> head/sys/fs/nfsserver/nfs_nfsdport.c >> >> Modified: head/sys/fs/nfsserver/nfs_nfsdport.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/nfsserver/nfs_nfsdport.c Sun Jun 3 19:37:17 2018 = (r334585) >> +++ head/sys/fs/nfsserver/nfs_nfsdport.c Sun Jun 3 19:46:44 2018 = >(r334586) >> @@ -1574,7 +1574,10 @@ nfsrvd_readdir(struct nfsrv_descript *nd, int isd= gram, >> struct nfsvattr at; >> int nlen, error =3D 0, getret =3D 1; >> int siz, cnt, fullsiz, eofflag, ncookies; >> - u_int64_t off, toff, verf; >> + u_int64_t off, toff; >> +#if 0 >> + u_int64_t verf; >> +#endif >> u_long *cookies =3D NULL, *cookiep; >> struct uio io; >> struct iovec iv; >> @@ -1591,7 +1594,9 @@ nfsrvd_readdir(struct nfsrv_descript *nd, int isdg= ram, >> NFSM_DISSECT(tl, u_int32_t *, 5 * NFSX_UNSIGNED); >> off =3D fxdr_hyper(tl); >> tl +=3D 2; >> +#if 0 >> verf =3D fxdr_hyper(tl); >> +#endif > >This functionally changes the code, though. Is fxdr_hyper() no longer >supposed to be called? It's not a problem. fxdr_hyper() is a "pure function with no side effects" = and just returns the translated value. It translates a 64bit number from XDR fo= rmat (big endian) to native architecture format. (The argument is a ptr to where= the value is in XDR. (Stands for eXternal Data Representation. A Sun thing from= the mid 1980s.) rick