From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay2.sgi.com [192.48.180.65]) by ml01.01.org (Postfix) with ESMTP id 0F96782232 for ; Tue, 20 Dec 2016 15:26:24 -0800 (PST) Received: from xmail.sgi.com (pv-excas1-dc21.corp.sgi.com [137.38.106.7]) by relay2.corp.sgi.com (Postfix) with ESMTP id 5812A304032; Tue, 20 Dec 2016 15:26:22 -0800 (PST) Received: from [128.162.232.243] (128.162.232.243) by xmail.sgi.com (137.38.106.6) with Microsoft SMTP Server (TLS) id 14.3.301.0; Tue, 20 Dec 2016 17:26:21 -0600 To: Andrew Fish , Kurt Kennett References: <1481194467-75920-1-git-send-email-dandan.bi@intel.com> <1481194467-75920-3-git-send-email-dandan.bi@intel.com> CC: Ruiyu Ni , Dandan Bi , "edk2-devel@lists.01.org" From: "Brian J. Johnson" Message-ID: <9b3fd167-13f0-d6a3-ac30-628055bc8286@sgi.com> Date: Tue, 20 Dec 2016 17:26:21 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [128.162.232.243] Subject: Re: [patch 2/8] FatPkg\EnhancedFatDxe: Initialize variable after declaration X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2016 23:26:24 -0000 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 8bit On 12/08/2016 05:11 PM, Andrew Fish wrote: >> On Dec 8, 2016, at 9:27 AM, Kurt Kennett wrote: >> >> This seems kind of silly. >> Why isn't this just const data? This adds code and memory accesses that are worthless and happen on every call to the function. >> > K2, > > I think this is an attempt to conform to the coding standard? I just went looking through the C Coding Standards document (https://github.com/tianocore-docs/Docs/raw/master/Specifications/CCS_2_1_Draft.pdf) and couldn't actually find this requirement. Which really surprises me... I must not be using the right search terms. Could someone point out the specific section covering this requirement? I have somebody asking me about it internally here. Sorry to be both dense and pedantic, -- Brian J. Johnson -------------------------------------------------------------------- My statements are my own, are not authorized by SGI, and do not necessarily represent SGI’s positions.