From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068025.outbound.protection.outlook.com [40.92.68.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 04BF521AEB0A2 for ; Wed, 26 Jul 2017 01:34:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=nMPmF9JZP7wv52s8f6p62QaVioK4gYAlej0o3JFTYLs=; b=M2Lt76jP6bdgqa4/abBD2Dq7Bcd6pUMrnGq5MaHqDkh4FUty3kKYzt6Ax6uRDqV/RkHj5gq2IIDDMVKNNkwDI032SCci4aKdUxlvLvYK5eHpV3dn8BvETzoBoP3HSR/jLiqQHMkYfB9oyeOWkrUGxfwpC/NQmBrQqsXBVIfjgEer0+JoBRTusuC93OCN17qLxRy7sWcIsQtIr/wAUMrRQ+KoTCmH/bv74DS70LME+YY2tYDXXcnDC2Irkk95TsEFpxBwXVFyxG+CQYUtOCfHWSzrTdk3raHz6Q3bk0shxP/Kc2xDmX7lv7+n6LvrqKgexCZmvsKZOlabmwAba6n66A== Received: from VE1EUR02FT033.eop-EUR02.prod.protection.outlook.com (10.152.12.56) by VE1EUR02HT081.eop-EUR02.prod.protection.outlook.com (10.152.13.243) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1240.9; Wed, 26 Jul 2017 08:36:16 +0000 Received: from AM4PR06MB1491.eurprd06.prod.outlook.com (10.152.12.54) by VE1EUR02FT033.mail.protection.outlook.com (10.152.12.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1240.9 via Frontend Transport; Wed, 26 Jul 2017 08:36:16 +0000 Received: from AM4PR06MB1491.eurprd06.prod.outlook.com ([fe80::dcd0:60e6:90e0:871b]) by AM4PR06MB1491.eurprd06.prod.outlook.com ([fe80::dcd0:60e6:90e0:871b%13]) with mapi id 15.01.1282.020; Wed, 26 Jul 2017 08:36:16 +0000 From: =?iso-8859-1?Q?Marvin_H=E4user?= To: "edk2-devel@lists.01.org" CC: "Fan, Jeff" Thread-Topic: [PATCH] UefiCpuPkg: Add BOOLEAN casts to return statements. Thread-Index: AQHTAgrvfObjc9SQq0S0ubEW1b38wKJlbgVAgABhmqA= Date: Wed, 26 Jul 2017 08:36:16 +0000 Message-ID: References: <542CF652F8836A4AB8DBFAAD40ED192A4C62E55C@shsmsx102.ccr.corp.intel.com> In-Reply-To: <542CF652F8836A4AB8DBFAAD40ED192A4C62E55C@shsmsx102.ccr.corp.intel.com> Accept-Language: de-DE, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: lists.01.org; dkim=none (message not signed) header.d=none;lists.01.org; dmarc=none action=none header.from=outlook.com; x-incomingtopheadermarker: OriginalChecksum:BBC7D1D3C4A7C2B1203F01620EB940ACC0B8F116D5D0167596A40CBC5A35CA7F; UpperCasedChecksum:6B2514BDF218EE215AFEF532E6BABF3049AB60ED5B5BCDAECDD1D08281501963; SizeAsReceived:7423; Count:45 x-tmn: [zWHM3taHMQz7Xia9VvCMy0jolB8cs4vvSojVReiN11GEIH3L0VMO1AHjZv/qf0kW] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VE1EUR02HT081; 7:MHSGsz7MWRPCdvJWHToFADrT9AF8eEIMR+RHU/rPCO8JD4UCjBmrKoMLjthUebA8J/AqDJ7FxCMoFb+P5YbWXVQznnXR2ikIoGwELYe1yGUGIgLc0Wj3dzVplklRUbL4fV7MSdP/G73ONHMte10LRbPO0vKW5pkeWpbHGkpxSKE6zmihHLFnoZdv3YM3QEfx4ND5IldLZX1ISMj2CG7XOvjbiSvah4fNdCa+zXkiL1E+OSC3CzZg7T2xwHiD7yqwLxoeshQFEWZIKgalUfZI3GPa2JrUl3Lv6iuJRbW4JEl2ho8Lcwx1lzM204O0xltX5LsdpGJc4if7bPUxRUzAmGncfln+12K7JeNOua+/MjrclJGY5vFwYF9lnaA4JD93sJ0+f6b25yScGhCZ33lxvGOkOMqXU9kwrSAADxVt/EMB9ye7DnVdmZlgDLad9oX5WpRjJki+Z1Ypb+wvAGG8m8g0USCOkOtAOy2D/uggrtsoIzL4fs0i30IRi3ZbugIij8S/fecQVbODnvwZowoLnrF5Xoe+TqyqMUJvMCp74V87Qwl4LE6EPMu6gMZSyPF4l7Xf2T8v00Re9L4Sc9HJBZl7afJm9PkWzEy7kRhn/PM1PrjKVAcNNEsIVPzlmuAB94wHQwVvIjavg6+FJpUS5hJvXdGjLqiBfHcwOPkakV4fPUzdxGAPCrFPlkqebWEhAYQn9DuYtR1yJlOYUPScoWayyNgK11H9IjwpgGTd0VPPURwsM/NTPdDLuYhW7edpyBLGvb1WTmr/ElHzWKydUA== x-incomingheadercount: 45 x-eopattributedmessage: 0 x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(7070007)(98901004); DIR:OUT; SFP:1901; SCL:1; SRVR:VE1EUR02HT081; H:AM4PR06MB1491.eurprd06.prod.outlook.com; FPR:; SPF:None; LANG:en; x-ms-office365-filtering-correlation-id: af52aaa7-18bc-4ba7-7cf3-08d4d401618e x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201702061074)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322350)(1603101448)(1601125374)(1701031045)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:VE1EUR02HT081; x-ms-traffictypediagnostic: VE1EUR02HT081: x-exchange-antispam-report-test: UriScan:(189930954265078)(162533806227266)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(444000031); SRVR:VE1EUR02HT081; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VE1EUR02HT081; x-forefront-prvs: 038002787A spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Jul 2017 08:36:16.2375 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR02HT081 Subject: Re: [PATCH] UefiCpuPkg: Add BOOLEAN casts to return statements. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jul 2017 08:34:17 -0000 Content-Language: de-DE Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Jeff, Visual Studio 2005 (and .NET 2003, though it is too old to compile using ED= K2. Maybe it should be deprecated?) is the version generating those errors,= all newer versions are fine. Thanks and regards, Marvin. > -----Original Message----- > From: Fan, Jeff [mailto:jeff.fan@intel.com] > Sent: Wednesday, July 26, 2017 4:45 AM > To: Marvin H=E4user ; edk2- > devel@lists.01.org > Subject: RE: [PATCH] UefiCpuPkg: Add BOOLEAN casts to return statements. >=20 > Marvin, >=20 > Could you tell what VS version you are using? >=20 > Jeff >=20 > -----Original Message----- > From: Marvin H=E4user [mailto:Marvin.Haeuser@outlook.com] > Sent: Friday, July 21, 2017 6:20 PM > To: edk2-devel@lists.01.org > Cc: Fan, Jeff > Subject: [PATCH] UefiCpuPkg: Add BOOLEAN casts to return statements. >=20 > Old versions of the Visual Studio C compiler return a value of type 'int'= for > comparisons, which is what the C99 standard defines in the sections 6.5.8= and > 6.5.9. When the result of a comparison is returned, int is implicitely ca= sted to > BOOLEAN, which is smaller, and hence a warning about a possible loss of d= ata > is generated. This patch adds casts to BOOLEAN where necessary to silence > these. >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Marvin Haeuser > --- > UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c | 8 += +++---- > UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c | 8 += +++- > --- > UefiCpuPkg/Library/CpuCommonFeaturesLib/Aesni.c | 2 += - > UefiCpuPkg/Library/CpuCommonFeaturesLib/C1e.c | 2 += - > UefiCpuPkg/Library/CpuCommonFeaturesLib/ClockModulation.c | 2 += - > UefiCpuPkg/Library/CpuCommonFeaturesLib/Eist.c | 2 += - > UefiCpuPkg/Library/CpuCommonFeaturesLib/ExecuteDisable.c | 2 += - > UefiCpuPkg/Library/CpuCommonFeaturesLib/FeatureControl.c | 4 += +-- > UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c | 2 += - > UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c | 6 > +++--- > UefiCpuPkg/Library/CpuCommonFeaturesLib/MonitorMwait.c | 2 += - > UefiCpuPkg/Library/CpuCommonFeaturesLib/PendingBreak.c | 2 += - > UefiCpuPkg/Library/CpuCommonFeaturesLib/Ppin.c | 2 += - > UefiCpuPkg/Library/CpuCommonFeaturesLib/X2Apic.c | 2 += - > UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c | 2 += - > 15 files changed, 24 insertions(+), 24 deletions(-) >=20 > diff --git a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c > b/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c > index 2091e5e2d0dd..55aee6c607f7 100644 > --- a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c > +++ b/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c > @@ -3,7 +3,7 @@ >=20 > This local APIC library instance supports xAPIC mode only. >=20 > - Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
> + Copyright (c) 2010 - 2017, Intel Corporation. All rights > + reserved.
> Copyright (c) 2017, AMD Inc. All rights reserved.
>=20 > This program and the accompanying materials @@ -49,9 +49,9 @@ > StandardSignatureIsAuthenticAMD ( > UINT32 RegEdx; >=20 > AsmCpuid(CPUID_SIGNATURE, NULL, &RegEbx, &RegEcx, &RegEdx); > - return (RegEbx =3D=3D CPUID_SIGNATURE_AUTHENTIC_AMD_EBX && > - RegEcx =3D=3D CPUID_SIGNATURE_AUTHENTIC_AMD_ECX && > - RegEdx =3D=3D CPUID_SIGNATURE_AUTHENTIC_AMD_EDX); > + return (BOOLEAN)(RegEbx =3D=3D CPUID_SIGNATURE_AUTHENTIC_AMD_EBX > && > + RegEcx =3D=3D CPUID_SIGNATURE_AUTHENTIC_AMD_ECX && > + RegEdx =3D=3D CPUID_SIGNATURE_AUTHENTIC_AMD_EDX); > } >=20 > /** > diff --git a/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c > b/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c > index d5d4efaeb408..bfd5acceebfa 100644 > --- a/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c > +++ b/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c > @@ -4,7 +4,7 @@ > This local APIC library instance supports x2APIC capable processors > which have xAPIC and x2APIC modes. >=20 > - Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
> + Copyright (c) 2010 - 2017, Intel Corporation. All rights > + reserved.
> Copyright (c) 2017, AMD Inc. All rights reserved.
>=20 > This program and the accompanying materials @@ -50,9 +50,9 @@ > StandardSignatureIsAuthenticAMD ( > UINT32 RegEdx; >=20 > AsmCpuid(CPUID_SIGNATURE, NULL, &RegEbx, &RegEcx, &RegEdx); > - return (RegEbx =3D=3D CPUID_SIGNATURE_AUTHENTIC_AMD_EBX && > - RegEcx =3D=3D CPUID_SIGNATURE_AUTHENTIC_AMD_ECX && > - RegEdx =3D=3D CPUID_SIGNATURE_AUTHENTIC_AMD_EDX); > + return (BOOLEAN)(RegEbx =3D=3D CPUID_SIGNATURE_AUTHENTIC_AMD_EBX > && > + RegEcx =3D=3D CPUID_SIGNATURE_AUTHENTIC_AMD_ECX && > + RegEdx =3D=3D CPUID_SIGNATURE_AUTHENTIC_AMD_EDX); > } >=20 > /** > diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/Aesni.c > b/UefiCpuPkg/Library/CpuCommonFeaturesLib/Aesni.c > index 178bfb50abcf..df0f56ab9d82 100644 > --- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/Aesni.c > +++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/Aesni.c > @@ -69,7 +69,7 @@ AesniSupport ( > IS_XEON_PHI_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo- > >DisplayModel)) { > MsrFeatureConfig =3D (MSR_SANDY_BRIDGE_FEATURE_CONFIG_REGISTER > *) ConfigData; > MsrFeatureConfig[ProcessorNumber].Uint64 =3D AsmReadMsr64 > (MSR_SANDY_BRIDGE_FEATURE_CONFIG); > - return (CpuInfo->CpuIdVersionInfoEcx.Bits.AESNI =3D=3D 1); > + return (BOOLEAN)(CpuInfo->CpuIdVersionInfoEcx.Bits.AESNI =3D=3D 1); > } > return FALSE; > } > diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/C1e.c > b/UefiCpuPkg/Library/CpuCommonFeaturesLib/C1e.c > index 47116355a8ff..00ebc5c9a19e 100644 > --- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/C1e.c > +++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/C1e.c > @@ -38,7 +38,7 @@ C1eSupport ( > IN VOID *ConfigData OPTIONAL > ) > { > - return IS_NEHALEM_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo- > >DisplayModel); > + return (BOOLEAN)IS_NEHALEM_PROCESSOR (CpuInfo->DisplayFamily, > + CpuInfo->DisplayModel); > } >=20 > /** > diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/ClockModulation.c > b/UefiCpuPkg/Library/CpuCommonFeaturesLib/ClockModulation.c > index 56e53561e9de..e625b061829f 100644 > --- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/ClockModulation.c > +++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/ClockModulation.c > @@ -38,7 +38,7 @@ ClockModulationSupport ( > IN VOID *ConfigData OPTIONAL > ) > { > - return (CpuInfo->CpuIdVersionInfoEdx.Bits.ACPI =3D=3D 1); > + return (BOOLEAN)(CpuInfo->CpuIdVersionInfoEdx.Bits.ACPI =3D=3D 1); > } >=20 > /** > diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/Eist.c > b/UefiCpuPkg/Library/CpuCommonFeaturesLib/Eist.c > index 2038171a14c3..593a1e1b35b5 100644 > --- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/Eist.c > +++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/Eist.c > @@ -38,7 +38,7 @@ EistSupport ( > IN VOID *ConfigData OPTIONAL > ) > { > - return (CpuInfo->CpuIdVersionInfoEcx.Bits.EIST =3D=3D 1); > + return (BOOLEAN)(CpuInfo->CpuIdVersionInfoEcx.Bits.EIST =3D=3D 1); > } >=20 > /** > diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/ExecuteDisable.c > b/UefiCpuPkg/Library/CpuCommonFeaturesLib/ExecuteDisable.c > index 921656a1e869..1ba942990113 100644 > --- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/ExecuteDisable.c > +++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/ExecuteDisable.c > @@ -50,7 +50,7 @@ ExecuteDisableSupport ( > } >=20 > AsmCpuid (CPUID_EXTENDED_CPU_SIG, NULL, NULL, NULL, &Edx.Uint32); > - return (Edx.Bits.NX !=3D 0); > + return (BOOLEAN)(Edx.Bits.NX !=3D 0); > } >=20 > /** > diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/FeatureControl.c > b/UefiCpuPkg/Library/CpuCommonFeaturesLib/FeatureControl.c > index d28c4ec51a04..fae09d8be711 100644 > --- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/FeatureControl.c > +++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/FeatureControl.c > @@ -65,7 +65,7 @@ VmxSupport ( > ASSERT (ConfigData !=3D NULL); > MsrRegister =3D (MSR_IA32_FEATURE_CONTROL_REGISTER *) ConfigData; > MsrRegister[ProcessorNumber].Uint64 =3D AsmReadMsr64 > (MSR_IA32_FEATURE_CONTROL); > - return (CpuInfo->CpuIdVersionInfoEcx.Bits.VMX =3D=3D 1); > + return (BOOLEAN)(CpuInfo->CpuIdVersionInfoEcx.Bits.VMX =3D=3D 1); > } >=20 > /** > @@ -215,7 +215,7 @@ SmxSupport ( > ASSERT (ConfigData !=3D NULL); > MsrRegister =3D (MSR_IA32_FEATURE_CONTROL_REGISTER *) ConfigData; > MsrRegister[ProcessorNumber].Uint64 =3D AsmReadMsr64 > (MSR_IA32_FEATURE_CONTROL); > - return (CpuInfo->CpuIdVersionInfoEcx.Bits.SMX =3D=3D 1); > + return (BOOLEAN)(CpuInfo->CpuIdVersionInfoEcx.Bits.SMX =3D=3D 1); > } >=20 > /** > diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c > b/UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c > index 40cc9d5fe0cf..ee037c35dc5a 100644 > --- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c > +++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c > @@ -41,7 +41,7 @@ LimitCpuidMaxvalSupport ( > UINT32 Eax; >=20 > AsmCpuid (CPUID_SIGNATURE, &Eax, NULL, NULL, NULL); > - return (Eax > 3); > + return (BOOLEAN)(Eax > 3); > } >=20 > /** > diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c > b/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c > index 72f665d32e36..0e3b3468d7bc 100644 > --- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c > +++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c > @@ -38,7 +38,7 @@ MceSupport ( > IN VOID *ConfigData OPTIONAL > ) > { > - return (CpuInfo->CpuIdVersionInfoEdx.Bits.MCE =3D=3D 1); > + return (BOOLEAN)(CpuInfo->CpuIdVersionInfoEdx.Bits.MCE =3D=3D 1); > } >=20 > /** > @@ -105,7 +105,7 @@ McaSupport ( > IN VOID *ConfigData OPTIONAL > ) > { > - return (CpuInfo->CpuIdVersionInfoEdx.Bits.MCA =3D=3D 1); > + return (BOOLEAN)(CpuInfo->CpuIdVersionInfoEdx.Bits.MCA =3D=3D 1); > } >=20 > /** > @@ -191,7 +191,7 @@ McgCtlSupport ( > return FALSE; > } > McgCap.Uint64 =3D AsmReadMsr64 (MSR_IA32_MCG_CAP); > - return (McgCap.Bits.MCG_CTL_P =3D=3D 1); > + return (BOOLEAN)(McgCap.Bits.MCG_CTL_P =3D=3D 1); > } >=20 > /** > diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/MonitorMwait.c > b/UefiCpuPkg/Library/CpuCommonFeaturesLib/MonitorMwait.c > index 1d43bd128afe..67aaf37d4e3d 100644 > --- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/MonitorMwait.c > +++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/MonitorMwait.c > @@ -38,7 +38,7 @@ MonitorMwaitSupport ( > IN VOID *ConfigData OPTIONAL > ) > { > - return (CpuInfo->CpuIdVersionInfoEcx.Bits.MONITOR =3D=3D 1); > + return (BOOLEAN)(CpuInfo->CpuIdVersionInfoEcx.Bits.MONITOR =3D=3D 1); > } >=20 > /** > diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/PendingBreak.c > b/UefiCpuPkg/Library/CpuCommonFeaturesLib/PendingBreak.c > index 8cafba4f4a87..5df2ef15ddcf 100644 > --- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/PendingBreak.c > +++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/PendingBreak.c > @@ -43,7 +43,7 @@ PendingBreakSupport ( > IS_CORE_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) > || > IS_PENTIUM_4_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo- > >DisplayModel) || > IS_PENTIUM_M_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo- > >DisplayModel)) { > - return (CpuInfo->CpuIdVersionInfoEdx.Bits.PBE =3D=3D 1); > + return (BOOLEAN)(CpuInfo->CpuIdVersionInfoEdx.Bits.PBE =3D=3D 1); > } > return FALSE; > } > diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/Ppin.c > b/UefiCpuPkg/Library/CpuCommonFeaturesLib/Ppin.c > index 146c4cfda3f9..438578a83230 100644 > --- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/Ppin.c > +++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/Ppin.c > @@ -53,7 +53,7 @@ PpinSupport ( > // Check whether platform support this feature. > // > PlatformInfo.Uint64 =3D AsmReadMsr64 > (MSR_IVY_BRIDGE_PLATFORM_INFO_1); > - return (PlatformInfo.Bits.PPIN_CAP !=3D 0); > + return (BOOLEAN)(PlatformInfo.Bits.PPIN_CAP !=3D 0); > } >=20 > return FALSE; > diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/X2Apic.c > b/UefiCpuPkg/Library/CpuCommonFeaturesLib/X2Apic.c > index b4a453c3525c..ecaf47a4af00 100644 > --- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/X2Apic.c > +++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/X2Apic.c > @@ -71,7 +71,7 @@ X2ApicSupport ( > // > X2ApicEnabled[ProcessorNumber] =3D (GetApicMode () =3D=3D > LOCAL_APIC_MODE_X2APIC) ? TRUE : FALSE; >=20 > - return (CpuInfo->CpuIdVersionInfoEcx.Bits.x2APIC =3D=3D 1); > + return (BOOLEAN)(CpuInfo->CpuIdVersionInfoEcx.Bits.x2APIC =3D=3D 1); > } >=20 > /** > diff --git > a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c > b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c > index 338f1a495cf4..c093356ab150 100644 > --- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c > +++ > b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c > @@ -650,7 +650,7 @@ IsCpuFeatureSetInCpuPcd ( > if ((Feature >> 3) >=3D CpuBitMaskSize) { > return FALSE; > } > - return ((*(CpuBitMask + (Feature >> 3)) & (1 << (Feature & 0x07))) != =3D 0); > + return (BOOLEAN)((*(CpuBitMask + (Feature >> 3)) & (1 << (Feature & > + 0x07))) !=3D 0); > } >=20 > /** > -- > 2.12.2.windows.2