From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8860D2112294F for ; Tue, 9 Oct 2018 03:13:59 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 07D273086249; Tue, 9 Oct 2018 10:13:59 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-35.rdu2.redhat.com [10.10.120.35]) by smtp.corp.redhat.com (Postfix) with ESMTP id 03A5174AB9; Tue, 9 Oct 2018 10:13:57 +0000 (UTC) To: "Zeng, Star" , Ard Biesheuvel , "Gao, Liming" Cc: "edk2-devel@lists.01.org" References: <20181009070614.20052-1-liming.gao@intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E335C1D@SHSMSX104.ccr.corp.intel.com> <0C09AFA07DD0434D9E2A0C6AEB0483103BC1372A@shsmsx102.ccr.corp.intel.com> From: Laszlo Ersek Message-ID: <9bf7dad6-2b38-dd19-40fe-caf7e49fe362@redhat.com> Date: Tue, 9 Oct 2018 12:13:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103BC1372A@shsmsx102.ccr.corp.intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 09 Oct 2018 10:13:59 +0000 (UTC) Subject: Re: [Patch] BaseTools LzmaCompress: Fix GCC warning misleading-indentation X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Oct 2018 10:13:59 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 10/09/18 10:24, Zeng, Star wrote: > Reviewed-by: Star Zeng > > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ard Biesheuvel > Sent: Tuesday, October 9, 2018 3:13 PM > To: Gao, Liming > Cc: edk2-devel@lists.01.org > Subject: Re: [edk2] [Patch] BaseTools LzmaCompress: Fix GCC warning misleading-indentation > > On 9 October 2018 at 09:11, Gao, Liming wrote: >> This issue in LzmaEnc.c is for encode. The copy SDK in MdeModulePkg and IntelFrameworkModulepkg is for decode. So, other copy SDK has no this issue. >> > > I understand. > > Thanks for the fix > > Acked-by: Ard Biesheuvel In the commit message, I referenced , which got reported meanwhile. Pushed as commit 50431b9cc70c. Thanks Laszlo >>> -----Original Message----- >>> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ard Biesheuvel >>> Sent: Tuesday, October 9, 2018 3:08 PM >>> To: Gao, Liming >>> Cc: edk2-devel@lists.01.org >>> Subject: Re: [edk2] [Patch] BaseTools LzmaCompress: Fix GCC warning misleading-indentation >>> >>> On 9 October 2018 at 09:06, Liming Gao wrote: >>>> GCC 6 or above reports the warning misleading-indentation. >>>> This patch fixes it. >>>> >>>> Contributed-under: TianoCore Contribution Agreement 1.1 >>>> Signed-off-by: Liming Gao >>>> Cc: Ard Biesheuvel >>>> --- >>>> BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c | 4 +++- >>>> 1 file changed, 3 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c b/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c >>>> index bebe664..e281716 100644 >>>> --- a/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c >>>> +++ b/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c >>>> @@ -1464,7 +1464,9 @@ static unsigned GetOptimum(CLzmaEnc *p, UInt32 position) >>>> unsigned limit = p->numFastBytes + 1; >>>> if (limit > numAvailFull) >>>> limit = numAvailFull; >>>> - for (len = 3; len < limit && data[len] == data2[len]; len++); >>>> + for (len = 3; len < limit && data[len] == data2[len]; len++) >>>> + { >>>> + } >>>> >>>> { >>>> unsigned state2 = kLiteralNextStates[state]; >>> >>> Thanks Liming. >>> >>> Don't we need this change in all copies of the LZMA SDK?