From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068043.outbound.protection.outlook.com [40.92.68.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A623521E0C305 for ; Thu, 27 Jul 2017 06:39:04 -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=M0Lic8k3JIq/P9N5e+44jE0e2hkgMbIiAS70P5xOkC4=; b=RJakSoWeRWVzBRYAwT6rHfFrwQHjw+Xc4G+XCsV6Q/jXaOFXtLVsehT9RRXEQSPokjYgFV0pYgmNAq8ff4RdmNpA/mU+JlNia28jYJEw7V2UlP+vrrQKjEnNGS98UUuBTXT+L12+6MxeiSdqpvLC5lT3OXsBWCq5sySYCudwpZtK1yUCyo1P20jxnbCOdL6PHhI7opCC5+8RkFOPA3+1XKYEurN+UR/9GaLhNeEm7xfw9kuXS4IEi15G0FOfGHOg4MpHnY7TVtVlIc8bu8gXKuf+skVDdAdPelE3hhaNbLfXC/o9ZL6HirjyDCfMcplr5O3ZPyA6w1LS1/HxLvphYA== Received: from HE1EUR02FT009.eop-EUR02.prod.protection.outlook.com (10.152.10.57) by HE1EUR02HT233.eop-EUR02.prod.protection.outlook.com (10.152.11.175) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1240.9; Thu, 27 Jul 2017 13:41:06 +0000 Received: from AM4PR06MB1491.eurprd06.prod.outlook.com (10.152.10.59) by HE1EUR02FT009.mail.protection.outlook.com (10.152.10.103) 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; Thu, 27 Jul 2017 13:41:06 +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.021; Thu, 27 Jul 2017 13:41:06 +0000 From: =?iso-8859-1?Q?Marvin_H=E4user?= To: "edk2-devel@lists.01.org" CC: "Gao, Liming" Thread-Topic: [PATCH] UefiCpuPkg: Add BOOLEAN casts to return statements. Thread-Index: AQHTAgrvfObjc9SQq0S0ubEW1b38wKJlbgVAgABhmqCAAeGH8IAABcQw Date: Thu, 27 Jul 2017 13:41:05 +0000 Message-ID: References: <542CF652F8836A4AB8DBFAAD40ED192A4C62E55C@shsmsx102.ccr.corp.intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14D75CACF@shsmsx102.ccr.corp.intel.com> In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14D75CACF@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:412D16964193B8773E7B353A0828F6568717D07711A0A22AA31D6AC080BC61FC; UpperCasedChecksum:5520087AE070C954157D2F09D9CC112B1F80B9FD05D92F61C974712F69F2D94E; SizeAsReceived:7617; Count:45 x-tmn: [c5vs5CwskAwx5fuitkKfltEDqzaNkGJmkTKmnuRM8B8hv66gtjowwsYgTPxXtiqi] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1EUR02HT233; 7:ja+9isoga21zN+5bb7Cd63G0dWJu+JgyPLmFQsqRpgcDGifutjwsKVU4xzICu4jqhjFb3cCoww7JvglhOZa2he02ulKnagBLTlyAVPThiFfHOMVs3Hj//LqlCwDgPKu4t2BZ0DZoj+miKHHJTJeQTQP1VI2tnvjnvIu4HdW3UvcdkEtPYki2djLmYLXzxz/QT/qLUj36HeQgCE40buNsL/NSOWo0kwkOLHrNJGT/40+RismSQi2LImDad8HwXcWrp2UAasoCsEiNVRMGJSOVYBGomSlN6NM1O7yq5XoqRP/4GxYokHyp3CE39beu9cv+Qu252NKW+yxBpfn1I2+XNEJ8uMVl2joWLQnP7jUDMmAxNeyI9KY5DdozOPQuaukT+mLwsSsrIRe+zRyuPhxIRAuSz3U4tTbLSjDgHyYdtxDa6ZhQuzCrbZpaZs4O8JVUXURKmSNcFzrBdk7QlP4SJUgKM+ubRs1cQe1InKN4YIe63KcJoGi/vmSTOandXK0OYynZ3mDRchQACwGs1a0Hxl5A/59WPjJGV4JAEqhPoolLDR9PU8ryGQNvtpJpBaBnRmqdSN1D6uns+APln6qpYzQY/oVLXuTzbGekzhJ649Cx1Vb0rRIUDfW5YFh8hgFxo63EjZYGPV/SF3VWUb9B9uV66tF/vkrKLJgrS9OqTNjq+y+zw5aFYcLBEFOmH2q/CApUkDJxG4SC8y+2LLpeifDkB0KvLycZEpR3ezmnwtIMoiSDeU2yipKyghaJtp8Du0/MafBqejE09/WAMnX+sw== x-incomingheadercount: 45 x-eopattributedmessage: 0 x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(7070007)(98901004); DIR:OUT; SFP:1901; SCL:1; SRVR:HE1EUR02HT233; H:AM4PR06MB1491.eurprd06.prod.outlook.com; FPR:; SPF:None; LANG:en; x-ms-office365-filtering-correlation-id: 2dd24b5b-f17f-4eb0-9e4b-08d4d4f52183 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:HE1EUR02HT233; x-ms-traffictypediagnostic: HE1EUR02HT233: x-exchange-antispam-report-test: UriScan:(189930954265078)(162533806227266)(228905959029699)(68840517438536); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(444000031); SRVR:HE1EUR02HT233; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:HE1EUR02HT233; x-forefront-prvs: 03818C953D spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jul 2017 13:41:05.8811 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR02HT233 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: Thu, 27 Jul 2017 13:39:05 -0000 Content-Language: de-DE Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hey Liming, I would without a doubt vote for VS2005 to be deprecated, especially when i= t isn't even tested anymore. Who would be in charge of that? The BaseTools maintainers? If it won't be deprecated, I think merging the changes should be done to su= pport all supported toolchains. Regards, Marvin. > -----Original Message----- > From: Gao, Liming [mailto:liming.gao@intel.com] > Sent: Thursday, July 27, 2017 3:17 PM > To: Marvin.Haeuser@outlook.com; edk2-devel@lists.01.org > Cc: Fan, Jeff > Subject: RE: [PATCH] UefiCpuPkg: Add BOOLEAN casts to return statements. >=20 > Marvin: > Yes. They are too old. We have no verification for them. >=20 > Thanks > Liming > > -----Original Message----- > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > > Marvin H?user > > Sent: Wednesday, July 26, 2017 4:36 PM > > To: edk2-devel@lists.01.org > > Cc: Fan, Jeff > > Subject: Re: [edk2] [PATCH] UefiCpuPkg: Add BOOLEAN casts to return > statements. > > > > Hi Jeff, > > > > Visual Studio 2005 (and .NET 2003, though it is too old to compile > > using EDK2. 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. > > > > > > Marvin, > > > > > > Could you tell what VS version you are using? > > > > > > Jeff > > > > > > -----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. > > > > > > 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 casted to BOOLEAN, which is smaller, > > > and hence a warning about a possible loss of data is generated. This > > > patch adds casts to BOOLEAN where necessary to silence these. > > > > > > 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(-) > > > > > > 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 @@ > > > > > > This local APIC library instance supports xAPIC mode only. > > > > > > - 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.
> > > > > > This program and the accompanying materials @@ -49,9 +49,9 @@ > > > StandardSignatureIsAuthenticAMD ( > > > UINT32 RegEdx; > > > > > > 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); > > > } > > > > > > /** > > > 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 processor= s > > > which have xAPIC and x2APIC modes. > > > > > > - 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.
> > > > > > This program and the accompanying materials @@ -50,9 +50,9 @@ > > > StandardSignatureIsAuthenticAMD ( > > > UINT32 RegEdx; > > > > > > 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); > > > } > > > > > > /** > > > 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); > > > } > > > > > > /** > > > 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); > > > } > > > > > > /** > > > 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); > > > } > > > > > > /** > > > 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 ( > > > } > > > > > > AsmCpuid (CPUID_EXTENDED_CPU_SIG, NULL, NULL, NULL, > &Edx.Uint32); > > > - return (Edx.Bits.NX !=3D 0); > > > + return (BOOLEAN)(Edx.Bits.NX !=3D 0); > > > } > > > > > > /** > > > 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); > > > } > > > > > > /** > > > @@ -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); > > > } > > > > > > /** > > > 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; > > > > > > AsmCpuid (CPUID_SIGNATURE, &Eax, NULL, NULL, NULL); > > > - return (Eax > 3); > > > + return (BOOLEAN)(Eax > 3); > > > } > > > > > > /** > > > 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); > > > } > > > > > > /** > > > @@ -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); > > > } > > > > > > /** > > > @@ -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); > > > } > > > > > > /** > > > 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); > > > } > > > > > > /** > > > 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); > > > } > > > > > > 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; > > > > > > - return (CpuInfo->CpuIdVersionInfoEcx.Bits.x2APIC =3D=3D 1); > > > + return (BOOLEAN)(CpuInfo->CpuIdVersionInfoEcx.Bits.x2APIC =3D=3D 1= ); > > > } > > > > > > /** > > > 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); > > > } > > > > > > /** > > > -- > > > 2.12.2.windows.2 > > > > _______________________________________________ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://lists.01.org/mailman/listinfo/edk2-devel