From nobody Fri May 3 03:08:16 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1500632423176299.55100012747073; Fri, 21 Jul 2017 03:20:23 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 750E121D1B286; Fri, 21 Jul 2017 03:18:19 -0700 (PDT) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-oln040092069063.outbound.protection.outlook.com [40.92.69.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1975C2193B804 for ; Fri, 21 Jul 2017 03:18:18 -0700 (PDT) Received: from HE1EUR02FT026.eop-EUR02.prod.protection.outlook.com (10.152.10.51) by HE1EUR02HT082.eop-EUR02.prod.protection.outlook.com (10.152.11.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1240.9; Fri, 21 Jul 2017 10:20:12 +0000 Received: from AM4PR06MB1491.eurprd06.prod.outlook.com (10.152.10.54) by HE1EUR02FT026.mail.protection.outlook.com (10.152.10.130) 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; Fri, 21 Jul 2017 10:20:12 +0000 Received: from AM4PR06MB1491.eurprd06.prod.outlook.com ([fe80::ad7e:bc05:6bd8:2470]) by AM4PR06MB1491.eurprd06.prod.outlook.com ([fe80::ad7e:bc05:6bd8:2470%13]) with mapi id 15.01.1261.024; Fri, 21 Jul 2017 10:20:12 +0000 X-Original-To: edk2-devel@lists.01.org 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=kOE65jVmxuL4Yfcom2P03XbEn9uNqiM86N9SBJk0Pko=; b=bRIp4wtGO+RmOxHEQrKIct6j+UFJG9+XjGgz27G6z4U0Eqd8syvbxREj3AmQ6lJnzMTd84V1pmBdE94Qmu8sQFxaZe15DjC33x4jpVr2bHOmauAK/5LCeXyWuhNIgC2nrJWhw6mIpimWFGsWZZTh40IM3AdjfbEzL4By8x6vgMSDESfp8ne4C5JDQE0D0ocxLMZZYkgenqBvMnaWtwcuWeOa04IZJR8lg4EV8PaBhMlw5D2oudDaJ4/tULTym4nOp1Jggq9HgHbi+CQ8551FtHCk1qLRGcS1Zi9TvL/joSQ+03dkkp+oxuZKj2LBS8d7sBfgnv7W1kKwc1Ip/T5/9g== From: =?iso-8859-1?Q?Marvin_H=E4user?= To: "edk2-devel@lists.01.org" Thread-Topic: [PATCH] UefiCpuPkg: Add BOOLEAN casts to return statements. Thread-Index: AQHTAgrvfObjc9SQq0S0ubEW1b38wA== Date: Fri, 21 Jul 2017 10:20:11 +0000 Message-ID: Accept-Language: de-DE, en-US Content-Language: 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:0D658E129D1B2C95A489A0C444EA6CA8BAA2993294B81AB2636795EB01114B8F; UpperCasedChecksum:88982F8267BDB8FB83BAC9AAD33E72B6ED6FFF37687D261EE7DC25D4091C1BDC; SizeAsReceived:7223; Count:44 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [Zn9705kHm6068X/9gQzF2UkhF/7QFOb3] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1EUR02HT082; 7:sJKbguJX/VdeewS5uXRUGmR7YnI500igZ7DVeEb17hGanZ/xaI9h/BREPMenoeerfamW4I6pAKtXqncLxvP0zVvCvAUUP845cSNTwG4/1wrlYDhUx4hGA4eTSdcb5Yo8WHP2VlVYxjxolxf+gAHYFrvmZU0T0fOiKmEeBlj+yqwNUWQ8fZYC1vNTXFJc2koqGrgeonhOraxqfKGNjSbtKsJvtEgxUDvn5/AZdTkARREiCfQEz8XYVlCx+9PU+2QnP9VK7NCV5tZx+XmT09Tt68T2W8cdmiJxmAh0COV2dWy65pR5ORWaJ7vVVqh+GY6s/o4ZiwV3I9wG0jD4j0EgGeGqDDDJ761xa9wlJQ4GDWDREG36h+cv4kcJH7Bw6tTtZKPXK7ESbt6SULcOOTqCINc2HMxSY+xZ83+Ht89a73lD3AUMH55B0j64Dc4vRixdQRtptBsyDEIQfun3g6iZPMVdmSqrjrP0DicY5qHwVwpciN9KQK7vMNkfhbDS1UUdkDwHpdcQL1eUwXW9rMuTH1Vagc32hNc3YuYkI/QUcIs4c/HKDDaPuR4Xj020AxS1USyvNNQ7zxbNGrzNfTVlvPS3t24GW6al4KG5K0PllbX4cTyiOA8d3qahmsSvWxqLiRoNOQK7P5hoogFHjuRN2QYA9M4geF2h+xw5Ugrv2TR3ZCMz3hh5ErqglGjFmVCq9eNoji1yShzVS0mR6AQ0JGmsIbWTESOFUjiO0O+WknW+alhdMCGYjYU7xvC7+BwTcpqrFBOU2rI99UtoHMwoNg== x-incomingheadercount: 44 x-eopattributedmessage: 0 x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(7070007)(98901004); DIR:OUT; SFP:1901; SCL:1; SRVR:HE1EUR02HT082; H:AM4PR06MB1491.eurprd06.prod.outlook.com; FPR:; SPF:None; LANG:en; x-ms-office365-filtering-correlation-id: 2df3e014-3851-4f70-0ad6-08d4d02211be 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)(1601125374)(1603101448)(1701031045)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:HE1EUR02HT082; x-ms-traffictypediagnostic: HE1EUR02HT082: x-exchange-antispam-report-test: UriScan:(189930954265078); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(444000031); SRVR:HE1EUR02HT082; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:HE1EUR02HT082; x-forefront-prvs: 0375972289 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jul 2017 10:20:11.9340 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR02HT082 Subject: [edk2] [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: , Cc: "jeff.fan@intel.com" Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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/Li= brary/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/U= efiCpuPkg/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/L= ibrary/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 *) Conf= igData; MsrFeatureConfig[ProcessorNumber].Uint64 =3D AsmReadMsr64 (MSR_SANDY_B= RIDGE_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/Lib= rary/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->DisplayMod= el); + return (BOOLEAN)IS_NEHALEM_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->D= isplayModel); } =20 /** diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/ClockModulation.c b/Ue= fiCpuPkg/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/Li= brary/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/Uef= iCpuPkg/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/Uef= iCpuPkg/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_C= ONTROL); - 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_C= ONTROL); - 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/U= efiCpuPkg/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/UefiC= puPkg/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/UefiC= puPkg/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/UefiC= puPkg/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->DisplayMode= l) || IS_PENTIUM_M_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayMode= l)) { - 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/Li= brary/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_MOD= E_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/RegisterCpuFeaturesL= ib.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 /** --=20 2.12.2.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel