From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.126; helo=mga18.intel.com; envelope-from=bob.c.feng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (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 19EE5211B63E5 for ; Mon, 14 Jan 2019 21:07:20 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jan 2019 21:07:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,480,1539673200"; d="scan'208";a="311876191" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga005.fm.intel.com with ESMTP; 14 Jan 2019 21:07:19 -0800 Received: from fmsmsx126.amr.corp.intel.com (10.18.125.43) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 14 Jan 2019 21:07:19 -0800 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by FMSMSX126.amr.corp.intel.com (10.18.125.43) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 14 Jan 2019 21:07:18 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.196]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.85]) with mapi id 14.03.0415.000; Tue, 15 Jan 2019 13:07:16 +0800 From: "Feng, Bob C" To: "Gao, Liming" , "edk2-devel@lists.01.org" Thread-Topic: [Patch] BaseTools GenFw: Fix XCODE5 build issue Thread-Index: AQHUrBCAlKpv1MgHH0yklPha4BxWP6WvyCNA Date: Tue, 15 Jan 2019 05:07:15 +0000 Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D160058F7F@SHSMSX101.ccr.corp.intel.com> References: <20190114135208.1232-1-liming.gao@intel.com> In-Reply-To: <20190114135208.1232-1-liming.gao@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 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: Tue, 15 Jan 2019 05:07:20 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Feng Bob C -----Original Message----- From: Gao, Liming=20 Sent: Monday, January 14, 2019 9:52 PM To: edk2-devel@lists.01.org Cc: Feng, Bob C Subject: [Patch] BaseTools GenFw: Fix XCODE5 build issue Remove extraneous parentheses around the comparison to silence this warning= . 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/Ge= nFw.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 =3D=3D EFI_IMAGE_NT_OPTIONAL_HDR3= 2_MAGIC)) { + if (ImgHdr->Pe32.OptionalHeader.Magic =3D=3D=20 + EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) { ImgHdr->Pe32.OptionalHeader.ImageBase =3D (UINT32) NewPe32BaseAddress; } else if (ImgHdr->Pe32Plus.OptionalHeader.Magic =3D=3D EFI_IMAGE_NT_OPT= IONAL_HDR64_MAGIC) { ImgHdr->Pe32Plus.OptionalHeader.ImageBase =3D NewPe32BaseAddress; @@ -= 2180,7 +2180,7 @@ Returns: // Set new base address into image // if (mOutImageType =3D=3D FW_REBASE_IMAGE || mOutImageType =3D=3D FW_SET_= ADDRESS_IMAGE) { - if ((PeHdr->Pe32.OptionalHeader.Magic =3D=3D EFI_IMAGE_NT_OPTIONAL_HDR= 32_MAGIC)) { + if (PeHdr->Pe32.OptionalHeader.Magic =3D=3D=20 + EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) { if (NewBaseAddress >=3D 0x100000000ULL) { Error (NULL, 0, 3000, "Invalid", "New base address is larger than = 4G for 32bit PE image"); goto Finish; -- 2.13.0.windows.1