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 F25A521959CB2 for ; Mon, 14 Jan 2019 06:35:43 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 46CAB80F9A; Mon, 14 Jan 2019 14:35:43 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-239.rdu2.redhat.com [10.10.120.239]) by smtp.corp.redhat.com (Postfix) with ESMTP id 933D416C19; Mon, 14 Jan 2019 14:35:42 +0000 (UTC) To: Liming Gao , edk2-devel@lists.01.org References: <20190114135208.1232-1-liming.gao@intel.com> From: Laszlo Ersek Message-ID: <813aa379-6556-f9af-102f-655b281499f0@redhat.com> Date: Mon, 14 Jan 2019 15:35:41 +0100 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: <20190114135208.1232-1-liming.gao@intel.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 14 Jan 2019 14:35:43 +0000 (UTC) Subject: Re: [Patch] BaseTools GenFw: Fix XCODE5 build issue 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: Mon, 14 Jan 2019 14:35:44 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 01/14/19 14:52, Liming Gao wrote: > Remove extraneous parentheses around the comparison to silence this warning. Can you please quote the warning message in the commit message? It's unclear what warning the commit message refers to. (No need to repost just for this.) Thanks Laszlo > This issue is caused by commit 8daa4278e80c70e6caabc525cd122744488253f5. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Liming Gao > Cc: Feng Bob C > --- > BaseTools/Source/C/GenFw/GenFw.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/BaseTools/Source/C/GenFw/GenFw.c b/BaseTools/Source/C/GenFw/GenFw.c > index 37278bbc68..af2c909866 100644 > --- a/BaseTools/Source/C/GenFw/GenFw.c > +++ b/BaseTools/Source/C/GenFw/GenFw.c > @@ -1014,7 +1014,7 @@ Returns: > // > // Update Image Base Address > // > - if ((ImgHdr->Pe32.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC)) { > + if (ImgHdr->Pe32.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) { > ImgHdr->Pe32.OptionalHeader.ImageBase = (UINT32) NewPe32BaseAddress; > } else if (ImgHdr->Pe32Plus.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC) { > ImgHdr->Pe32Plus.OptionalHeader.ImageBase = NewPe32BaseAddress; > @@ -2180,7 +2180,7 @@ Returns: > // Set new base address into image > // > if (mOutImageType == FW_REBASE_IMAGE || mOutImageType == FW_SET_ADDRESS_IMAGE) { > - if ((PeHdr->Pe32.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC)) { > + if (PeHdr->Pe32.OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) { > if (NewBaseAddress >= 0x100000000ULL) { > Error (NULL, 0, 3000, "Invalid", "New base address is larger than 4G for 32bit PE image"); > goto Finish; >